Home
last modified time | relevance | path

Searched refs:callback (Results 126 – 150 of 364) sorted by last modified time

12345678910>>...15

/PHP-7.2/ext/standard/tests/array/
H A Darray_reduce.phpt7 /* Prototype: array array_reduce(array $array, mixed $callback, mixed $initial);
8 Description: Iteratively reduce the array to a single value via the callback
H A Darray_reduce_error.phpt5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
6 * Description: Iteratively reduce the array to a single value via the callback.
17 $callback = 1;
20 var_dump( array_reduce($input, $callback, $initial, $extra_arg) );
H A Darray_reduce_variation1.phpt5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
6 * Description: Iteratively reduce the array to a single value via the callback.
24 echo "\n--- Testing with a callback with too few parameters ---\n";
27 echo "\n--- Testing with a callback with too many parameters ---\n";
39 --- Testing with a callback with too few parameters ---
42 --- Testing with a callback with too many parameters ---
H A Darray_reduce_variation2.phpt5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
6 * Description: Iteratively reduce the array to a single value via the callback.
27 Warning: array_reduce() expects parameter 2 to be a valid callback, function 'bogusbogus' not found…
H A Darray_reduce_variation3.phpt5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
6 * Description: Iteratively reduce the array to a single value via the callback.
20 echo "\n--- Static method callback ---\n";
23 echo "\n--- Instance method callback ---\n";
31 --- Static method callback ---
34 --- Instance method callback ---
H A Darray_map_001.phpt2 array_map() and exceptions in the callback
H A Darray_map_basic.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
H A Darray_map_error.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
27 echo "\n-- Testing array_map() function with less no. of arrays than callback function arguments --…
38 echo "\n-- Testing array_map() function with more no. of arrays than callback function arguments --…
58 -- Testing array_map() function with less no. of arrays than callback function arguments --
61 -- Testing array_map() function with more no. of arrays than callback function arguments --
H A Darray_map_object1.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
130 Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method SimpleClass::…
141 Warning: array_map() expects parameter 1 to be a valid callback, cannot access private method Simpl…
147 Warning: array_map() expects parameter 1 to be a valid callback, cannot access protected method Sim…
153 Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two member…
159 Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method ChildClass::e…
172 Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method FinalClass::f…
192 Warning: array_map() expects parameter 1 to be a valid callback, cannot access private method Stati…
196 Warning: array_map() expects parameter 1 to be a valid callback, cannot access protected method Sta…
H A Darray_map_object2.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
40 Warning: array_map() expects parameter 1 to be a valid callback, class 'non-existent' not found in …
44 Warning: array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have …
H A Darray_map_object3.phpt2 Test array_map() function : object functionality - class methods as callback function
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Testing array_map() for object functionality with following callback function variations:
17 echo "*** Testing array_map() : class methods as callback function ***\n";
65 *** Testing array_map() : class methods as callback function ***
77 Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have …
90 Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have …
H A Darray_map_variation10.phpt2 Test array_map() function : usage variations - anonymous callback function
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing anoymous callback function with following variations
14 echo "*** Testing array_map() : anonymous callback function ***\n";
41 *** Testing array_map() : anonymous callback function ***
H A Darray_map_variation11.phpt2 Test array_map() function : usage variations - with recursive callback
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing subarrays and recursive callback function
14 echo "*** Testing array_map() : recursive callback function ***\n";
16 // callback function
30 *** Testing array_map() : recursive callback function ***
H A Darray_map_variation12.phpt2 Test array_map() function : usage variations - built-in function as callback
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing buit-in function as callback function
58 Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or inval…
H A Darray_map_variation13.phpt2 Test array_map() function : usage variations - callback function with different return types
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing different callback function returning:
15 echo "*** Testing array_map() : callback with diff return value ***\n";
58 *** Testing array_map() : callback with diff return value ***
H A Darray_map_variation14.phpt2 Test array_map() function : usage variations - null value for 'callback' argument
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing null values for $callback argument and testing whether shortest
15 echo "*** Testing array_map() : null value for 'callback' argument ***\n";
26 /* calling array_map() with null callback */
47 *** Testing array_map() : null value for 'callback' argument ***
119 Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid f…
123 Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two member…
H A Darray_map_variation15.phpt2 Test array_map() function : usage variations - non existent 'callback' function
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing non existent function for $callback argument
14 echo "*** Testing array_map() : non existent 'callback' function ***\n";
26 *** Testing array_map() : non existent 'callback' function ***
28 Warning: array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found …
H A Darray_map_variation16.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
43 Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or inval…
47 Warning: array_map() expects parameter 1 to be a valid callback, function 'array' not found or inva…
51 Warning: array_map() expects parameter 1 to be a valid callback, function 'empty' not found or inva…
55 Warning: array_map() expects parameter 1 to be a valid callback, function 'eval' not found or inval…
59 Warning: array_map() expects parameter 1 to be a valid callback, function 'exit' not found or inval…
63 Warning: array_map() expects parameter 1 to be a valid callback, function 'isset' not found or inva…
67 Warning: array_map() expects parameter 1 to be a valid callback, function 'list' not found or inval…
71 Warning: array_map() expects parameter 1 to be a valid callback, function 'print' not found or inva…
H A Darray_map_variation17.phpt2 Test array_map() function : usage variations - unexpected values for 'callback' argument
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing different scalar/nonscalar values in place of $callback
14 echo "*** Testing array_map() : unexpected values for 'callback' argument ***\n";
77 *** Testing array_map() : unexpected values for 'callback' argument ***
80 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
84 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
88 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
92 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
[all …]
H A Darray_map_variation18.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
16 function callback($a)
97 var_dump( array_map('callback', $unexpected_inputs[$count]));
H A Darray_map_variation19.phpt2 Test array_map() function : usage variations - callback pass semantics
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() with a pass-by-value callback forced to behave as a pass-by-reference function.
17 function callback($a) {
21 array_map('callback', $arr1);
25 array_map("callback", $arr2);
H A Darray_map_variation3.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
16 function callback($a)
53 var_dump( array_map('callback', $arr1) );
H A Darray_map_variation4.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
16 function callback($a)
73 var_dump( array_map('callback', $arr1) );
H A Darray_map_variation6.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
16 function callback($a)
30 var_dump( array_map('callback', $arr1));
H A Darray_map_variation7.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
16 * 5) one more array than callback function arguments
21 function callback($a, $b)
27 var_dump( array_map('callback', array(1, 2, 3), array()) );
28 var_dump( array_map('callback', array(), array('a', 'b', 'c')) );
29 var_dump( array_map('callback', array(1, 2, 3), array('a', 'b')) );
30 var_dump( array_map('callback', array(012, 0x2F, 0X1A), array(2.3, 12.4e2)) );
31 var_dump( array_map('callback', array(), array(1, 2, 3), array('a', 'b')) ); // passing more no. o…

Completed in 31 milliseconds

12345678910>>...15