/PHP-7.2/ext/standard/tests/array/ |
H A D | array_walk_error1.phpt | 2 Test array_walk() function : error conditions 21 echo "*** Testing array_walk() : error conditions ***\n"; 23 echo "-- Testing array_walk() function with zero arguments --\n"; 24 var_dump( array_walk() ); 26 echo "-- Testing array_walk() function with one argument --\n"; 27 var_dump( array_walk($input) ); 30 var_dump( array_walk($input, "non_existent") ); 35 *** Testing array_walk() : error conditions *** 36 -- Testing array_walk() function with zero arguments -- 40 -- Testing array_walk() function with one argument -- [all …]
|
H A D | array_walk_variation1.phpt | 2 Test array_walk() function : usage variations - unexpected values for 'input' argument 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 14 echo "*** Testing array_walk() : unexpected values for 'input' argument ***\n"; 30 // extra parameter passed to array_walk() 87 var_dump( array_walk($input_values[$count], "callback") ); 88 var_dump( array_walk($input_values[$count], "callback", $user_data) ); 95 *** Testing array_walk() : unexpected values for 'input' argument *** 126 Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d 161 Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d 164 Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d [all …]
|
H A D | array_walk_variation2.phpt | 2 Test array_walk() function : usage variations - unexpected values in place of 'funcname' argument 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 14 echo "*** Testing array_walk() : unexpected values for 'funcname' argument ***\n"; 84 var_dump( array_walk($input, $funcname_values[$count]) ); 85 var_dump( array_walk($input, $funcname_values[$count], $user_data )); 92 *** Testing array_walk() : unexpected values for 'funcname' argument *** 95 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on… 98 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on… 102 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on… 105 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on… [all …]
|
H A D | array_walk.phpt | 2 array_walk() tests 6 var_dump(array_walk()); 8 var_dump(array_walk($var,1)); 10 var_dump(array_walk($var,"")); 19 var_dump(array_walk($var, "foo", "data")); 26 var_dump(array_walk($var,"foo2", "data")); 34 Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d 37 Warning: array_walk() expects parameter 1 to be array, integer given in %s on line %d 40 Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid …
|
H A D | array_walk_error2.phpt | 2 Test array_walk() function : error conditions - callback parameters 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 11 * Testing array_walk() by passing more number of parameters to callback function 22 echo "*** Testing array_walk() : error conditions - callback parameters ***\n"; 26 var_dump( array_walk($input, "callback1") ); 31 var_dump( array_walk($input, "callback2", 4) ); 38 var_dump( @array_walk($input, "callback1") ); 43 var_dump( @array_walk($input, "callback2", 4) ); 50 var_dump( array_walk($input, "callback1", 20, 10) ); 58 *** Testing array_walk() : error conditions - callback parameters *** [all …]
|
H A D | array_walk_variation8.phpt | 2 Test array_walk() function : usage variations - buit-in function as callback 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 17 echo "*** Testing array_walk() : built-in function as callback ***\n"; 22 var_dump( array_walk($input, 'pow')); 25 var_dump( array_walk($input, "min")); 28 var_dump( array_walk($input, "echo")); 33 *** Testing array_walk() : built-in function as callback *** 40 Warning: array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or inva…
|
H A D | array_walk_basic2.phpt | 2 Test array_walk() function : basic functionality - associative array 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 10 echo "*** Testing array_walk() : basic functionality ***\n"; 46 echo "-- Using array_walk with default parameters to show array contents --\n"; 47 var_dump(array_walk($fruits, 'test_print')); 49 echo "-- Using array_walk with one optional parameter to modify contents --\n"; 50 var_dump (array_walk($fruits, 'test_alter', 'fruit')); 53 var_dump (array_walk($fruits, 'test_print')); 58 *** Testing array_walk() : basic functionality *** 59 -- Using array_walk with default parameters to show array contents -- [all …]
|
H A D | array_walk_objects.phpt | 2 array_walk() and objects 19 array_walk($stdclass, "walk"); 22 array_walk($t, "walk"); 25 array_walk($var, "walk"); 27 array_walk($var, "walk"); 43 Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d
|
H A D | array_walk_basic1.phpt | 2 Test array_walk() function : basic functionality - regular array 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 10 echo "*** Testing array_walk() : basic functionality ***\n"; 38 echo "-- Using array_walk() with default parameters to show array contents --\n"; 39 var_dump( array_walk($fruits, 'test_print')); 41 echo "-- Using array_walk() with all parameters --\n"; 42 var_dump( array_walk($fruits, 'with_userdata', "Added")); 47 *** Testing array_walk() : basic functionality *** 48 -- Using array_walk() with default parameters to show array contents -- 62 -- Using array_walk() with all parameters --
|
H A D | array_walk_variation7.phpt | 2 Test array_walk() function : usage variations - anonymous callback function 5 /* Prototype : proto bool array_walk(array $input, string $funcname [, mixed $userdata]) 19 echo "*** Testing array_walk() : anonymous function as callback ***\n"; 24 var_dump( array_walk($input, function($value) { var_dump($value); echo "\n"; })); 27 var_dump( array_walk($input, function($value, $key) { var_dump($key); var_dump($value); echo "\n"; … 30 var_dump( array_walk($input, function($value, $key, $user_data) { var_dump($key); var_dump($value);… 33 var_dump( array_walk($input, function($value, $key, $user_data) { var_dump($key); var_dump($value);… 36 var_dump( array_walk( $input, function() { echo "1\n"; })); 40 *** Testing array_walk() : anonymous function as callback *** 85 Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
|
H A D | array_walk_closure.phpt | 2 array_walk() closure tests 6 var_dump(array_walk()); 9 var_dump(array_walk($ar, $ar)); 12 var_dump(array_walk($ar, $ar)); 15 var_dump(array_walk($ar, function(){ var_dump(func_get_args());})); 25 var_dump(array_walk($ar, $func, $user_data)); 37 var_dump(array_walk($ar, $func, $user_data)); 50 var_dump(array_walk($ar, $func, $user_data)); 66 var_dump(array_walk($ar, "sum_it_up_object", $user_data)); 81 var_dump(array_walk($ar, "sum_it_up_array", $user_data)); [all …]
|
H A D | array_walk_variation9.phpt | 2 Test array_walk() function : usage variations - different callback functions 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 11 * Passing different types of callback functions to array_walk() 16 echo "*** Testing array_walk() : callback function variation ***\n"; 29 var_dump( array_walk($input, 'callback_two_parameter')); 39 var_dump( array_walk($input, 'callback_one_parameter')); 46 var_dump( array_walk($input, 'callback_no_parameter')); 49 var_dump( array_walk($input, 'callback_two_parameter', 10)); 54 *** Testing array_walk() : callback function variation ***
|
H A D | array_walk_variation4.phpt | 2 Test array_walk() function : usage variations - 'input' array with subarray 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 11 * Testing array_walk() with an array having subarrays as elements 14 echo "*** Testing array_walk() : array with subarray ***\n"; 39 var_dump( array_walk( $input, "callback")); 44 *** Testing array_walk() : array with subarray ***
|
H A D | array_walk_object2.phpt | 2 Test array_walk() function : object functionality - array of objects 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 11 * Testing array_walk() with an array of objects 14 echo "*** Testing array_walk() : array of objects ***\n"; 72 var_dump( array_walk($input, "callback_private", 1)); 74 var_dump( array_walk($input, "callback_public")); 76 var_dump( array_walk($input, "callback_protected")); 81 *** Testing array_walk() : array of objects ***
|
H A D | array_walk_variation5.phpt | 2 Test array_walk() function : usage variations - 'input' argument containing reference variables 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 11 * Testing array_walk() with an array having reference variables 14 echo "*** Testing array_walk() : array with references ***\n"; 39 var_dump( array_walk($input, "callback")); 44 *** Testing array_walk() : array with references ***
|
H A D | bug61730.phpt | 2 Bug #61730 (Segfault from array_walk modifying an array passed by reference) 7 array_walk( 15 array_walk(
|
H A D | array_walk_object1.phpt | 2 Test array_walk() function : object functionality 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 14 echo "*** Testing array_walk() : object functionality ***\n"; 48 var_dump( array_walk($input, "callback", 1)); 53 *** Testing array_walk() : object functionality ***
|
H A D | array_walk_variation3.phpt | 2 Test array_walk() function : usage variations - 'input' array with different values 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 11 * Testing array_walk() with following types of 'input' arrays: 28 echo "*** Testing array_walk() : 'input' array with different values***\n"; 60 var_dump( array_walk($input_values[$count], "print_value", $count+1)); 65 *** Testing array_walk() : 'input' array with different values***
|
H A D | array_walk_variation6.phpt | 2 Test array_walk() function : usage variations - 'input' argument as diff. associative arrays 5 /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) 15 echo "*** Testing array_walk() : 'input' as an associative array ***\n"; 65 var_dump( array_walk($input, "for_numeric", 10)); 70 var_dump( array_walk($input, "for_string")); 75 var_dump( array_walk($input, "for_string")); 80 var_dump( array_walk($input, "for_mixed")); 85 *** Testing array_walk() : 'input' as an associative array ***
|
H A D | bug69068.phpt | 2 Bug #69068: Exchanging array during array_walk -> memory errors 7 array_walk($array, function($value, $key) {
|
H A D | 001.phpt | 2 Test array_merge and array_walk 42 echo " -- Testing array_walk() -- \n"; 43 array_walk ($data, 'echo_kv'); 103 -- Testing array_walk() --
|
H A D | bug69068_2.phpt | 2 Bug #69068: Exchanging array during array_walk -> memory errors (variation) 8 array_walk($array, function(&$value, $key) use ($array2) {
|
/PHP-7.2/tests/lang/ |
H A D | bug24658.phpt | 25 array_walk($a, 'no_typehint'); 27 array_walk($a, 'no_typehint_ref'); 29 array_walk($a, 'typehint'); 31 array_walk($a, 'typehint_ref'); 59 #1 %s(%d): array_walk(Array, 'typehint')
|
/PHP-7.2/Zend/tests/ |
H A D | bug31720.phpt | 2 Bug #31720 (Invalid object callbacks not caught in array_walk()) 7 array_walk($array, array($nonesuchvar,'show')); 13 Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid…
|
H A D | foreach_012.phpt | 2 array_walk() function precerve foreach by reference iterator pointer 9 array_walk($a, function (&$x) {$x+=10;});
|