TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
581 B
31 lines
581 B
--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);
|
|
}
|
|
function main()
|
|
{
|
|
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"
|
|
}
|
|
|