2 /* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
3 * Description: Sort an array in reverse order
4 * Source code: ext/standard/array.c
8 * Test behaviour of rsort() when:
9 * 1. passed an array of referenced variables
10 * 2. $array_arg is a reference to another array
11 * 3. $array_arg is passed by reference
14 echo "*** Testing rsort() : variation ***\n";
20 // an array containing integer references
21 $unsorted_numerics = array( &$value1 , &$value2, &$value3);
23 echo "\n-- 'flag' value is defualt --\n";
24 $temp_array = $unsorted_numerics;
25 var_dump( rsort($temp_array) );
26 var_dump( $temp_array);
28 echo "\n-- 'flag' = SORT_REGULAR --\n";
29 $temp_array = &$unsorted_numerics;
30 var_dump( rsort($temp_array, SORT_REGULAR
) );
31 var_dump( $temp_array);