diff options
author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:34:59 -0400 |
---|---|---|
committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:34:59 -0400 |
commit | ce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61 (patch) | |
tree | acdb9a8816483652a9db1a47db71df5df43707c5 /ext/standard/tests/array/bug25359.phpt | |
parent | 10f5b47dc7c1cf2b9a00991629f43652710322d3 (diff) | |
download | php-ce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61.tar.gz |
Imported Upstream version 5.1.1upstream/5.1.1
Diffstat (limited to 'ext/standard/tests/array/bug25359.phpt')
-rw-r--r-- | ext/standard/tests/array/bug25359.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ext/standard/tests/array/bug25359.phpt b/ext/standard/tests/array/bug25359.phpt new file mode 100644 index 000000000..0b9b89a70 --- /dev/null +++ b/ext/standard/tests/array/bug25359.phpt @@ -0,0 +1,32 @@ +--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" +} |