Re: type hinting
| From: | Sam Barrow | Date: | Mon, 07 Jan 2008 04:06:25 +0000 |
| Subject: | Re: type hinting | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34569@lists.php.net to get a copy of this message | ||
On Sun, 2008-01-06 at 15:41 -0300, Cristian Rodriguez wrote:
> 2008/1/4, Jani Taskinen <jani.taskinen@sci.fi>:
>
> > As I'm +1 for OPTIONAL scalar-type hinting.
>
> me too +1 as long as :
>
> <?php
>
> function foo(int $a) {}
>
> foo('5');
>
> ?>
>
> Raises an error, and is rejected because is not a valid integer, otherwise -1
Agreed, this is the current behavior of the patch.