1--TEST--
2Test natcasesort() function : usage variations - referenced variables
3--FILE--
4<?php
5/*
6 * Pass an array of referenced variables to test how natcasesort() re-orders it
7 */
8
9echo "*** Testing natcasesort() : usage variation ***\n";
10
11$value1 = 100;
12$value2 = 33;
13$value3 = 555;
14
15echo "\n-- Initial test --\n";
16$array =  array( &$value1 , &$value2, &$value3);
17var_dump( natcasesort($array) );
18var_dump($array);
19
20echo "\n-- Change \$value1 --\n";
21$value1 = -29;
22var_dump( natcasesort($array) );
23var_dump($array);
24
25echo "Done";
26?>
27--EXPECT--
28*** Testing natcasesort() : usage variation ***
29
30-- Initial test --
31bool(true)
32array(3) {
33  [1]=>
34  &int(33)
35  [0]=>
36  &int(100)
37  [2]=>
38  &int(555)
39}
40
41-- Change $value1 --
42bool(true)
43array(3) {
44  [0]=>
45  &int(-29)
46  [1]=>
47  &int(33)
48  [2]=>
49  &int(555)
50}
51Done
52