php-src/ext/standard/tests/array/bug25359.phpt
Steph Fox 833f4150a1 - killed off UEXPECT
- could someone please fix var_export2.phpt? NUL is corrupted, can't fix here
2008-05-26 23:36:10 +00:00

33 lines
563 B
PHP

--TEST--
Bug #25359 (array_multisort() does not work in a function if array is global or reference)
--FILE--
<?php
function does_not_work()
{
global $data; // Remove this line to make array_multisort() work
$data = array('first', 'fifth', 'second', 'forth', 'third');
$sort = array(1, 5, 2, 4, 3);
array_multisort($sort, $data);
var_dump($data);
}
does_not_work();
?>
--EXPECT--
array(5) {
[0]=>
unicode(5) "first"
[1]=>
unicode(6) "second"
[2]=>
unicode(5) "third"
[3]=>
unicode(5) "forth"
[4]=>
unicode(5) "fifth"
}