ID: 33295
User updated by: pumuckel at metropolis dot de
Reported By: pumuckel at metropolis dot de
-Status: Open
+Status: Closed
Bug Type: Arrays related
Operating System: Linux
PHP Version: 5.0.4
New Comment:
Will be fixed when bug #33286 got fixed.
A complete patch was supplied by me to phpdev (Andrei)
Previous Comments:
------------------------------------------------------------------------
[2005-06-10 09:59:58] pumuckel at metropolis dot de
Description:
------------
Nested uasort function call broken. see also bug #33286, same topic -
other function ;-)
Reproduce code:
---------------
<?php
function test_subfunc(&$item1, $key)
{
echo " test_subfunc<br/>";
}
function test_func($item2, $key)
{
echo "test_func<br/>";
$arr = array(1, 2, 3, 4);
uasort($arr, 'test_subfunc');
}
$x = array(5,6,7);
uasort($x, 'test_func');
?>
Expected result:
----------------
test_func
test_subfunc
test_subfunc
test_subfunc
test_subfunc
test_func
test_subfunc
test_subfunc
test_subfunc
test_subfunc
test_func
test_subfunc
test_subfunc
test_subfunc
test_subfunc
Actual result:
--------------
test_func
test_subfunc
test_subfunc
test_subfunc
test_subfunc
test_subfunc
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33295&edit=1