Re: Return type hints
| From: | Christian Schneider | Date: | Mon, 07 Apr 2008 16:49:01 +0000 |
| Subject: | Re: Return type hints | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36851@lists.php.net to get a copy of this message | ||
Felipe Pena wrote:
>> Right, this shouldn't even be on the agenda before we have scalar type
>> hints. So, perhaps you can make a patch for that first Felipe?
>
> I don't thought this before!
> Sure, i'll try provide a patch.
Just so this side was mentioned once again too: There are people who
consider type hints and especially scalar type hints A Bad Thing(tm) as
it is contrary to the PHP strength of dynamic typing and automatic type
conversion.
I just ran into this (IMHO unnecessary) limitation with array_reduce:
Why should it only reduce to an int? Why not a string or an array? I
plan on submitting a patch for PHP 6 to allow other types too.
- Chris