Re: U
| From: | Sam Barrow | Date: | Sun, 06 Jan 2008 02:33:01 +0000 |
| Subject: | Re: U | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34517@lists.php.net to get a copy of this message | ||
On Sun, 2008-01-06 at 01:11 +0200, Vlad Bosinceanu wrote:
> Also,
>
> function foo(SomeClass $obj) would error out if passed something other
> than a SomeClass instance, while
> function foo(int $number) would just cast $number to int.
>
> Not really intuitive and not really consistent.
My patch does not cast. I think this is pointless to cast type hints, as type juggling will be
performed anyway when the function arguments are echoed, passed to other functions, etc.