Re: Return type hints
| From: | Stanislav Malyshev | Date: | Mon, 07 Apr 2008 16:57:58 +0000 |
| Subject: | Re: Return type hints | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36852@lists.php.net to get a copy of this message | ||
Hi!
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.I'm not sure I understand - how array_reduce is related to having type hints? You could make array_reduce to do additional things, but that doesn't require introducing strong typing into php. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com