1--TEST--
2Test natcasesort() function : usage variations - recursive arrays
3--FILE--
4<?php
5/*
6 * Pass natcasesort() an infinitely recursive array to test how it is re-ordered
7 */
8
9echo "*** Testing natcasesort() : usage variations ***\n";
10
11$array = array (1, 3.00, 'zero', '2');
12$array[] = &$array;
13var_dump($array);
14
15var_dump(@natcasesort($array));
16var_dump($array);
17
18echo "Done";
19?>
20--EXPECT--
21*** Testing natcasesort() : usage variations ***
22array(5) {
23  [0]=>
24  int(1)
25  [1]=>
26  float(3)
27  [2]=>
28  string(4) "zero"
29  [3]=>
30  string(1) "2"
31  [4]=>
32  *RECURSION*
33}
34bool(true)
35array(5) {
36  [0]=>
37  int(1)
38  [3]=>
39  string(1) "2"
40  [1]=>
41  float(3)
42  [4]=>
43  *RECURSION*
44  [2]=>
45  string(4) "zero"
46}
47Done
48