Home
last modified time | relevance | path

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

12

/PHP-7.2/ext/standard/tests/array/
H A Duasort_variation7.phpt2 Test uasort() function : usage variations - anonymous function as 'cmp_function'
5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
11 * Passing different anonymous functions as 'cmp_function'
16 echo "*** Testing uasort() : anonymous function as 'cmp_function' ***\n";
18 $cmp_function = function($value1, $value2) {
26 var_dump( uasort($array_arg, $cmp_function) );
29 $cmp_function = function(&$value1, &$value2) {
37 var_dump( uasort($array_arg, $cmp_function ) );
43 *** Testing uasort() : anonymous function as 'cmp_function' ***
44 -- Anonymous 'cmp_function' with parameters passed by value --
[all …]
H A Dusort_variation7.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
11 * Pass an anonymous comparison function as $cmp_function argument to test behaviour()
16 $cmp_function = function($value1, $value2) {
24 echo "\n-- Anonymous 'cmp_function' with parameters passed by value --\n";
25 var_dump( usort($array_arg, $cmp_function) );
30 $cmp_function = function(&$value1, &$value2) {
36 echo "\n-- Anonymous 'cmp_function' with parameters passed by reference --\n";
37 var_dump( usort($array_arg, $cmp_function) );
44 -- Anonymous 'cmp_function' with parameters passed by value --
59 -- Anonymous 'cmp_function' with parameters passed by reference --
H A Duasort_variation8.phpt2 Test uasort() function : usage variations - built-in function as 'cmp_function'
5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
11 * Passing different built-in library functions in place of 'cmp_function'
16 echo "*** Testing uasort() : built in function as 'cmp_function' ***\n";
23 echo "-- Testing uasort() with built-in 'cmp_function': strcasecmp() --\n";
27 echo "-- Testing uasort() with built-in 'cmp_function': strcmp() --\n";
41 *** Testing uasort() : built in function as 'cmp_function' ***
42 -- Testing uasort() with built-in 'cmp_function': strcasecmp() --
56 -- Testing uasort() with built-in 'cmp_function': strcmp() --
70 -- Testing uasort() with language construct as 'cmp_function' --
[all …]
H A Dusort_variation8.phpt2 Test usort() function : usage variations - use built in functions as $cmp_function arg
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
23 echo "\n-- Testing usort() with built-in 'cmp_function': strcasecmp() --\n";
28 echo "\n-- Testing usort() with built-in 'cmp_function': strcmp() --\n";
34 echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
38 echo "\n-- Testing usort() with language construct as 'cmp_function' --\n";
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' --
81 -- Testing usort() with language construct as 'cmp_function' --
H A Duasort_variation9.phpt2 Test uasort() function : usage variations - 'cmp_function' with reference argument
5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
13 echo "*** Testing uasort() : 'cmp_function' with reference arguments ***\n";
37 echo "-- Passing integer values to 'cmp_function' --\n";
43 echo "-- Passing string values to 'cmp_function' --\n";
50 *** Testing uasort() : 'cmp_function' with reference arguments ***
51 -- Passing integer values to 'cmp_function' --
69 -- Passing string values to 'cmp_function' --
H A Dusort_variation4.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
16 function cmp_function($value1, $value2)
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') );
H A Duasort_variation4.phpt5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
16 /* Prototype : int cmp_function(mixed $value1, mixed $value2)
23 function cmp_function($value1, $value2)
41 var_dump( uasort($int_values, 'cmp_function') ); // expecting: bool(true)
47 var_dump( uasort($octal_values, 'cmp_function') ); // expecting: bool(true)
53 var_dump( uasort($hex_values, 'cmp_function') ); // expecting: bool(true)
59 var_dump( uasort($float_values, 'cmp_function') ); // expecting: bool(true)
65 var_dump( uasort($empty_array, 'cmp_function') ); // expecting: bool(true)
H A Duasort_variation5.phpt5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
16 /* Prototype : int cmp_function(mixed $value1, mixed $value2)
23 function cmp_function($value1, $value2)
62 var_dump( uasort($single_quoted_values, 'cmp_function') ); // expecting: bool(true)
71 var_dump( uasort($double_quoted_values, 'cmp_function') ); // expecting: bool(true)
77 var_dump( uasort($heredoc_values, 'cmp_function') ); // expecting: bool(true)
H A Dusort_variation5.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
16 function cmp_function($value1, $value2)
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') );
H A Duasort_variation10.phpt5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
15 /* Prototype : int cmp_function(mixed $value1, mixed $value2)
22 function cmp_function($value1, $value2)
53 var_dump( uasort($array_arg, 'cmp_function') ); // expecting: bool(true)
H A Duasort_variation6.phpt5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
15 /* Prototype : int cmp_function(mixed $value1, mixed $value2)
22 function cmp_function($value1, $value2)
49 var_dump( uasort($temp_array, 'cmp_function') ); // expecting: bool(true)
H A Duasort_object2.phpt5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
22 /* Prototype : int cmp_function(mixed $value1, mixed $value2)
29 function cmp_function($value1, $value2)
94 var_dump( uasort($array_arg, 'cmp_function') );
105 var_dump( uasort($array_arg, 'cmp_function') );
116 var_dump( uasort($array_arg, 'cmp_function') );
H A Dusort_variation6.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
17 function cmp_function($value1, $value2)
45 var_dump( usort($temp_array, 'cmp_function') );
51 var_dump( usort($array_args[5], 'cmp_function') );
H A Dusort_variation9.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
16 function cmp_function($value1, $value2)
45 var_dump( usort($array_arg, 'cmp_function') );
H A Dusort_object2.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
20 function cmp_function($value1, $value2)
73 var_dump( usort($array_arg, 'cmp_function') );
84 var_dump( usort($array_arg, 'cmp_function') );
95 var_dump( usort($array_arg, 'cmp_function') );
H A Duksort_error.phpt5 /* Prototype : bool uksort(array array_arg, string cmp_function)
15 $cmp_function = 'string_val';
17 var_dump( uksort($array_arg, $cmp_function, $extra_arg) );
H A Dusort_error1.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
19 $cmp_function = 'string_val';
21 var_dump( usort($array_arg, $cmp_function, $extra_arg) );
H A Duasort_variation3.phpt5 /* Prototype : bool uasort(array $array_arg, string $cmp_function)
17 /* Prototype : int cmp_function(mixed $value1, mixed $value2)
24 function cmp_function($value1, $value2)
91 var_dump( uasort($array_arg, 'cmp_function') );
H A Dusort_variation3.phpt5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
16 function cmp_function($value1, $value2)
73 var_dump( usort($array_arg, 'cmp_function') );
H A Dusort_error2.phpt2 Test usort() function : error conditions - Pass unknown 'cmp_function'
5 /* Prototype : bool usort(array $array_arg, string $cmp_function)
/PHP-7.2/ext/spl/tests/
H A DarrayObject_uasort_error1.phpt5 /* Prototype : int ArrayObject::uasort(callback cmp_function)
6 * Description: proto int ArrayIterator::uasort(callback cmp_function)
H A DarrayObject_uksort_error1.phpt5 /* Prototype : int ArrayObject::uksort(callback cmp_function)
6 * Description: proto int ArrayIterator::uksort(callback cmp_function)
H A DarrayObject_uasort_basic1.phpt5 /* Prototype : int ArrayObject::uasort(callback cmp_function)
6 * Description: proto int ArrayIterator::uasort(callback cmp_function)
H A DarrayObject_uksort_basic1.phpt5 /* Prototype : int ArrayObject::uksort(callback cmp_function)
6 * Description: proto int ArrayIterator::uksort(callback cmp_function)
/PHP-7.2/ext/spl/
H A Dspl.php657 function uasort(mixed cmp_function) {/**/} argument
661 function uksort(mixed cmp_function) {/**/} argument
778 function uasort(mixed cmp_function) {/**/} argument
782 function uksort(mixed cmp_function) {/**/} argument

Completed in 38 milliseconds

12