/PHP-5.3/ext/standard/tests/array/ |
H A D | usort_error1.phpt | 2 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 D | usort_variation8.phpt | 5 /* 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 D | usort_variation6.phpt | 15 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 D | usort_variation1.phpt | 2 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 D | usort_error2.phpt | 2 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 D | usort_variation2.phpt | 2 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 D | usort_object2.phpt | 15 * 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 D | usort_variation4.phpt | 2 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 D | usort_basic.phpt | 2 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 D | usort_variation3.phpt | 2 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 D | usort_variation10.phpt | 2 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 D | usort_variation5.phpt | 2 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 D | usort_variation7.phpt | 2 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 D | usort_variation9.phpt | 2 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 D | usort_object1.phpt | 2 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 D | 003.phpt | 2 Test usort, uksort and uasort 26 echo "\n -- Testing usort() -- \n"; 27 usort ($data, 'cmp'); 81 -- Testing usort() --
|
H A D | unexpected_array_mod_bug.phpt | 14 usort($my_var, "usercompare"); 20 Warning: usort(): Array was modified by the user comparison function in %s on line %d
|
H A D | bug50006_1.phpt | 2 Bug #50006 (Segfault caused by uksort()) - usort variant 11 usort($data, 'magic_sort_cmp');
|
/PHP-5.3/ext/standard/tests/dir/ |
H A D | readdir_variation2.phpt | 31 usort($entries, "mysort");
|
/PHP-5.3/ext/standard/ |
H A D | php_array.h | 38 PHP_FUNCTION(usort);
|
H A D | array.c | 629 PHP_FUNCTION(usort) in PHP_FUNCTION() argument
|
H A D | basic_functions.c | 3266 PHP_FE(usort, arginfo_usort)
|
/PHP-5.3/ |
H A D | run-tests.php | 776 usort($test_files, "test_sort"); 918 usort($test_files, "test_sort"); 1562 usort($test_files, "test_sort");
|
H A D | server-tests.php | 806 usort($this->test_files,array($this,"test_sort"));
|
H A D | UPGRADING | 49 - The array functions natsort(), natcasesort(), usort(), uasort(), uksort(),
|