Lines Matching refs:usort
2 Test usort() function : usage variations - use built in functions as $cmp_function arg
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Test usort() when comparison function is:
16 echo "*** Testing usort() : usage variation ***\n";
23 echo "\n-- Testing usort() with built-in 'cmp_function': strcasecmp() --\n";
25 var_dump( usort($temp_array1, 'strcasecmp') );
28 echo "\n-- Testing usort() with built-in 'cmp_function': strcmp() --\n";
30 var_dump( usort($temp_array2, 'strcmp') );
34 echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
36 var_dump( usort($temp_array3, 'echo') );
38 echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
40 var_dump( usort($temp_array4, 'exit') );
44 *** Testing usort() : usage variation ***
46 -- Testing usort() with built-in 'cmp_function': strcasecmp() --
61 -- Testing usort() with built-in 'cmp_function': strcmp() --
76 -- Testing usort() with language construct as 'cmp_function' --
78 Warning: usort() expects parameter 2 to be a valid callback, function 'echo' not found or invalid f…
81 -- Testing usort() with language construct as 'cmp_function' --
83 Warning: usort() expects parameter 2 to be a valid callback, function 'exit' not found or invalid f…