xref: /php-src/Zend/tests/bug52939.phpt (revision f4173a8e)
1--TEST--
2Bug #52939 (zend_call_function_array does not respect ZEND_SEND_PREFER_REF)
3--FILE--
4<?php
5$ar1 = array("row1" => 2, "row2" => 1);
6var_dump(array_multisort($ar1));
7var_dump($ar1);
8
9$ar1 = array("row1" => 2, "row2" => 1);
10$args = array(&$ar1);
11var_dump(call_user_func_array("array_multisort", $args));
12var_dump($ar1);
13
14$ar1 = array("row1" => 2, "row2" => 1);
15$args = array($ar1);
16var_dump(call_user_func_array("array_multisort", $args));
17var_dump($ar1);
18?>
19--EXPECT--
20bool(true)
21array(2) {
22  ["row2"]=>
23  int(1)
24  ["row1"]=>
25  int(2)
26}
27bool(true)
28array(2) {
29  ["row2"]=>
30  int(1)
31  ["row1"]=>
32  int(2)
33}
34bool(true)
35array(2) {
36  ["row1"]=>
37  int(2)
38  ["row2"]=>
39  int(1)
40}
41