import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-array / array_walk_recursive_error1.php
blobc9a1b560b6339fc6ca3f9a292924ae8dfdd2fe58
1 <?php
2 /* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
3 * Description: Apply a user function to every member of an array
4 * Source code: ext/standard/array.c
5 */
7 $input = array(1, 2);
9 /* Prototype : callback(mixed value, mixed key, mixed user_data)
10 * Parameters : value - value in key/value pair
11 * key - key in key/value pair
12 * user_data - extra parameter
14 function callback ($value, $key, $user_data) {
15 echo "\ncallback() invoked \n";
18 echo "*** Testing array_walk_recursive() : error conditions ***\n";
20 echo "-- Testing array_walk_recursive() function with zero arguments --\n";
21 var_dump( array_walk_recursive() );
23 echo "-- Testing array_walk_recursive() function with one argument --\n";
24 var_dump( array_walk_recursive($input) );
26 $input = array( array(1, 2), array(3), array(4, 5));
27 echo "-- Testing array_walk_recursive() function with non existent callback function --\n";
28 var_dump( array_walk_recursive($input, "non_existent") );
30 echo "Done";