#33447 [NEW]: 0<TR><TD><a href="page1.html">page1</a></td> mixed array_reduce starting value

From: Date: Thu, 23 Jun 2005 09:23:29 +0000
Subject: #33447 [NEW]: 0<TR><TD><a href="page1.html">page1</a></td> mixed array_reduce starting value
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80886@lists.php.net to get a copy of this message
From: david dot tulloh at infaze dot com dot au Operating system: PHP version: 5CVS-2005-06-23 (dev) PHP Bug Type: Feature/Change Request Bug description: 0<TR><TD><a href="page1.html">page1</a></td> mixed array_reduce starting value 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 bug report at http://bugs.php.net/?id=33447&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33447&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33447&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33447&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33447&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33447&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33447&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33447&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33447&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33447&r=support Expected behavior: http://bugs.php.net/fix.php?id=33447&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33447&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33447&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33447&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33447&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33447&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33447&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33447&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33447&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33447&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33447&r=mysqlcfg

« previous php.bugs (#80886) next »