[PATCH] allow array_reduce to have a mixed starting value
| From: | David Tulloh | Date: | Sun, 26 Jun 2005 22:29:08 +0000 |
| Subject: | [PATCH] allow array_reduce to have a mixed starting value | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-16913@lists.php.net to get a copy of this message | ||
I opened bug #33447 the other day which is a feature request to allow
array_reduce to have a mixed starting value. It currently will only
accept integers which I feel is an odd limitation since the array can
hold any value.
This is a trivial patch to array_reduce which removes this limitation.
All the tests passed with this modification (that passed without it). I
also included a test file which tests the new functionality and provides
a few examples of what it could be useful for.
David