Home
last modified time | relevance | path

Searched refs:usort (Results 1 – 25 of 25) sorted by relevance

/PHP-5.3/ext/standard/tests/array/
H A Dusort_error1.phpt2 Test usort() function : error conditions - Pass incorrect number of arguments
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass incorrect number of arguments to usort() to test behaviour
14 echo "*** Testing usort() : error conditions ***\n";
16 //Test usort with one more than the expected number of arguments
21 var_dump( usort($array_arg, $cmp_function, $extra_arg) );
23 // Testing usort with one less than the expected number of arguments
26 var_dump( usort($array_arg) );
30 *** Testing usort() : error conditions ***
32 -- Testing usort() function with more than expected no. of arguments --
[all …]
H A Dusort_variation8.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Test usort() when comparison function is:
16 echo "*** Testing usort() : usage variation ***\n";
25 var_dump( usort($temp_array1, 'strcasecmp') );
30 var_dump( usort($temp_array2, 'strcmp') );
36 var_dump( usort($temp_array3, 'echo') );
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() --
[all …]
H A Dusort_variation6.phpt15 echo "*** Testing usort() : usage variation ***\n";
45 var_dump( usort($temp_array, 'cmp_function') );
47 echo "-- Array after call to usort() --\n";
50 echo "\n-- Pass usort() a sub-array --\n";
51 var_dump( usort($array_args[5], 'cmp_function') );
53 echo "-- Array after call to usort() --\n";
58 *** Testing usort() : usage variation ***
60 -- Pass usort() a two-dimensional array --
62 -- Array after call to usort() --
124 -- Pass usort() a sub-array --
[all …]
H A Dusort_variation1.phpt2 Test usort() function : usage variations - Pass different data types as $array_arg arg
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass different data types as $array_arg argument to usort() to test behaviour
14 echo "*** Testing usort() : usage variations ***\n";
99 // loop through each element of $inputs to check the behavior of usort()
103 var_dump( usort($input, 'cmp_function') );
112 *** Testing usort() : usage variations ***
161 Warning: usort() expects parameter 1 to be array, null given in %s on line %d
166 Warning: usort() expects parameter 1 to be array, null given in %s on line %d
224 Warning: usort() expects parameter 1 to be array, null given in %s on line %d
[all …]
H A Dusort_error2.phpt2 Test usort() function : error conditions - Pass unknown 'cmp_function'
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass an unknown comparison function to usort() to test behaviour.
16 echo "*** Testing usort() : error conditions ***\n";
36 echo "\n-- Testing usort() function with non-existent compare function --\n";
37 var_dump( usort($array_arg, 'non_existent') );
41 var_dump( usort($array_arg, 'non_existent', $extra_arg) );
45 *** Testing usort() : error conditions ***
47 -- Testing usort() function with non-existent compare function --
52 -- Testing usort() function with non-existent compare function and extra argument --
[all …]
H A Dusort_variation2.phpt2 Test usort() function : usage variations - Pass different data types as $cmp_function arg
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass different data types as $cmp_function argument to usort() to test behaviour
14 echo "*** Testing usort() : usage variation ***\n";
88 // loop through each element of $inputs to check the behavior of usort()
92 var_dump( usort($array_arg, $input) );
101 *** Testing usort() : usage variation ***
105 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
110 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
115 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
[all …]
H A Dusort_object2.phpt15 * to test behaviour of usort()
18 echo "*** Testing usort() : object functionality ***\n";
66 echo "-- Testing usort() with StaticClass objects --\n";
73 var_dump( usort($array_arg, 'cmp_function') );
77 echo "-- Testing usort() with EmptyClass objects --\n";
84 var_dump( usort($array_arg, 'cmp_function') );
95 var_dump( usort($array_arg, 'cmp_function') );
100 *** Testing usort() : object functionality ***
101 -- Testing usort() with StaticClass objects --
117 -- Testing usort() with EmptyClass objects --
[all …]
H A Dusort_variation4.phpt2 Test usort() function : usage variations - numeric data
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass arrays of numeric data to usort() to test how it is re-ordered
14 echo "*** Testing usort() : usage variation ***\n";
35 var_dump( usort($int_values, 'cmp_function') );
43 var_dump( usort($octal_values, 'cmp_function') );
51 var_dump( usort($hex_values, 'cmp_function') );
59 var_dump( usort($float_values, 'cmp_function') );
66 var_dump( usort($empty_array, 'cmp_function') );
71 *** Testing usort() : usage variation ***
H A Dusort_basic.phpt2 Test usort() function : basic functionality
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Test basic functionality of usort() with indexed and associative arrays
14 echo "*** Testing usort() : basic functionality ***\n";
32 var_dump( usort($int_values, 'cmp') );
39 var_dump( usort($string_values, 'cmp') );
46 var_dump( usort($numeric_key_arg, 'cmp') );
53 var_dump( usort($string_key_arg, 'cmp') );
58 *** Testing usort() : basic functionality ***
H A Dusort_variation3.phpt2 Test usort() function : usage variations - diff. array values
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass an array with different data types as keys to usort() to test how it is re-ordered
14 echo "*** Testing usort() : usage variation ***\n";
73 var_dump( usort($array_arg, 'cmp_function') );
74 echo "\n-- Sorted array after usort() function call --\n";
79 *** Testing usort() : usage variation ***
82 -- Sorted array after usort() function call --
H A Dusort_variation10.phpt2 Test usort() function : usage variations - duplicate keys and values
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass an array with duplicate keys and values to usort() to test behaviour
14 echo "*** Testing usort() : usage variation ***\n";
34 var_dump( usort($array_arg, 'cmp') );
41 var_dump( usort($array_arg, 'cmp') );
46 *** Testing usort() : usage variation ***
H A Dusort_variation5.phpt2 Test usort() function : usage variations - string data
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass arrays of string data to usort() to test how it is re-ordered
14 echo "*** Testing usort() : usage variation ***\n";
54 var_dump( usort($single_quoted_values, 'cmp_function') );
65 var_dump( usort($double_quoted_values, 'cmp_function') );
73 var_dump( usort($heredoc_values, 'cmp_function') );
78 *** Testing usort() : usage variation ***
H A Dusort_variation7.phpt2 Test usort() function : usage variations - Anonymous comparison function
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
14 echo "*** Testing usort() : usage variation ***\n";
21 var_dump( usort($array_arg, create_function('$value1, $value2',$cmp_function) ) );
27 var_dump( usort($array_arg, create_function('&$value1, &$value2', $cmp_function) ) );
32 *** Testing usort() : usage variation ***
H A Dusort_variation9.phpt2 Test usort() function : usage variations - referenced variables
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
14 echo "*** Testing usort() : usage variation ***\n";
45 var_dump( usort($array_arg, 'cmp_function') );
50 *** Testing usort() : usage variation ***
H A Dusort_object1.phpt2 Test usort() function : object functionality - different number of properties
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
12 * to test behaviour of usort()
15 echo "*** Testing usort() : object functionality ***\n";
73 var_dump( usort($array_arg, 'simple_cmp') );
82 var_dump( usort($array_arg, 'multiple_cmp') );
87 *** Testing usort() : object functionality ***
H A D003.phpt2 Test usort, uksort and uasort
26 echo "\n -- Testing usort() -- \n";
27 usort ($data, 'cmp');
81 -- Testing usort() --
H A Dunexpected_array_mod_bug.phpt14 usort($my_var, "usercompare");
20 Warning: usort(): Array was modified by the user comparison function in %s on line %d
H A Dbug50006_1.phpt2 Bug #50006 (Segfault caused by uksort()) - usort variant
11 usort($data, 'magic_sort_cmp');
/PHP-5.3/ext/standard/tests/dir/
H A Dreaddir_variation2.phpt31 usort($entries, "mysort");
/PHP-5.3/ext/standard/
H A Dphp_array.h38 PHP_FUNCTION(usort);
H A Darray.c629 PHP_FUNCTION(usort) in PHP_FUNCTION() argument
H A Dbasic_functions.c3266 PHP_FE(usort, arginfo_usort)
/PHP-5.3/
H A Drun-tests.php776 usort($test_files, "test_sort");
918 usort($test_files, "test_sort");
1562 usort($test_files, "test_sort");
H A Dserver-tests.php806 usort($this->test_files,array($this,"test_sort"));
H A DUPGRADING49 - The array functions natsort(), natcasesort(), usort(), uasort(), uksort(),

Completed in 81 milliseconds