ID: 33447
Updated by: [EMAIL PROTECTED]
-Summary: 0<TR><TD><a href="page1.html">page1</a></td>
mixed
array_reduce starting value
Reported By: david dot tulloh at infaze dot com dot au
-Status: Open
+Status: Feedback
Bug Type: Feature/Change Request
PHP Version: 5CVS-2005-06-23 (dev)
New Comment:
And what if you try without the last parameter for array_reduce() ?
Previous Comments:
------------------------------------------------------------------------
[2005-06-23 11:23:28] david dot tulloh at infaze dot com dot au
Description:
------------
The array_reduce function currently only starts with an integer value.
This seriously limits it's functionality.
For example, it should be trivial to use array_reduce to concatonate an
array of strings. This currently isn't possible.
Reproduce code:
---------------
$list = Array("page1", "page2", "page3");
print_r(
array_reduce($list,
create_function('$v, $w', 'return $v.$w;')
, '')
);
Expected result:
----------------
page1page2page3
Actual result:
--------------
0page1page2page3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33447&edit=1