Re: [RFC] Scalar Type Hinting With Casts (re-opening)
| From: | Park Framework | Date: | Mon, 14 Jul 2014 22:43:05 +0000 |
| Subject: | Re: [RFC] Scalar Type Hinting With Casts (re-opening) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75513@lists.php.net to get a copy of this message | ||
2014-07-15 1:24 GMT+03:00 Alain Williams <addw@phcomp.co.uk>:
> On Tue, Jul 15, 2014 at 01:16:49AM +0300, Park Framework wrote:
> > Maybe we should make two different syntax?
> >
> > fun(int $num, array $list) - for strict type compliance
> > fun((int) $num, (array) $list) - converted to type
>
> +1
>
> Don't forget to note that we will still retain the current syntax:
>
> fun($num, $list) - arguments passed as is, not type
> checking/juggling
>
Yes, of course!