#31599 [NEW]: array_walk_recursive simply does nothing
From: vortexx at freemail dot hu
Operating system: Windows 2000 SP4
PHP version: 5.0.2
PHP Bug Type: Arrays related
Bug description: array_walk_recursive simply does nothing
Description:
------------
array_walk_recursive simply refuses to do anything whatsoever (even with
the example code in the PHP docs!), while array_walk works fine.
Please note:
I am using PHP 5.0.2 and not PHP5.0.3 because I am unable to us ethe
latter due to another bug I reported, still open here:
http://bugs.php.net/bug.php?id=31175
Reproduce code:
---------------
(taken from
http://www.php.net/manual/en/function.array-walk-recursive.php)
$sweet = array('a' => 'apple', 'b' => 'banana');
$fruits = array('sweet' => $sweet, 'sour' => 'lemon');
function test_print($item, $key)
{
echo "$key holds $item\n";
}
array_walk_recursive($fruits, 'test_print');
Expected result:
----------------
a holds apple
b holds banana
sour holds lemon
Actual result:
--------------
[nothing, just blank!]
--
Edit bug report at http://bugs.php.net/?id=31599&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31599&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31599&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31599&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31599&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31599&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31599&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31599&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31599&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31599&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31599&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31599&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31599&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31599&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31599&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31599&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31599&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31599&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31599&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31599&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31599&r=mysqlcfg
Thread (3 messages)
- vortexx at freemail dot hu