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
7 /* Passing object in place of an 'input' argument to test object functionality
9 echo "*** Testing array_walk_recursive() : object functionality ***\n";
12 * Prototype : callback(mixed $value, mixed $key, int $addvalue
13 * Parameters : $value - values in given input array
14 * $key - keys in given input array
15 * $addvalue - value to be added
16 * Description : Function adds the addvalue to each element of an array
19 function callback($value, $key, $user_data)
32 public function __construct($setVal)
34 $this->pri_value
= $setVal;
35 $this->pub_value
= $setVal;
36 $this->pro_value
= $setVal;
40 // object for 'input' argument
41 $input = new MyClass(10);
43 var_dump( array_walk_recursive($input, "callback", 1));