2 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
3 * Description: Applies the callback to the elements of the given arrays
4 * Source code: ext/standard/array.c
7 echo "*** Testing array_map() : error conditions ***\n";
10 echo "\n-- Testing array_map() function with Zero arguments --\n";
11 var_dump( array_map() );
13 // Testing array_map with one less than the expected number of arguments
14 echo "\n-- Testing array_map() function with one less than expected no. of arguments --\n";
15 function callback1() {
18 var_dump( array_map('callback1') );
20 echo "\n-- Testing array_map() function with less no. of arrays than callback function arguments --\n";
22 function callback2($p, $q) {
25 var_dump( array_map('callback2', $arr1) );
27 echo "\n-- Testing array_map() function with more no. of arrays than callback function arguments --\n";
30 var_dump( array_map('callback2', $arr1, $arr2, $arr3) );