cvs: php-src /ext/standard/tests/array bug25359.phpt
| From: | Jani Taskinen | Date: | Sat, 30 Jul 2005 13:38:00 +0000 |
| Subject: | cvs: php-src /ext/standard/tests/array bug25359.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-33129@lists.php.net to get a copy of this message | ||
sniper Sat Jul 30 09:38:00 2005 EDT
Added files:
/php-src/ext/standard/tests/array bug25359.phpt
Log:
Added test for bug #25359
http://cvs.php.net/co.php/php-src/ext/standard/tests/array/bug25359.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/array/bug25359.phpt
+++ php-src/ext/standard/tests/array/bug25359.phpt
--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]=>
string(5) "first"
[1]=>
string(6) "second"
[2]=>
string(5) "third"
[3]=>
string(5) "forth"
[4]=>
string(5) "fifth"
}