Hi,
I can’t understand how many arguments we can pass to array_walk_recursive(…) function.
The manual at: manual entry for array_walk_recursive shows:
array_walk_recursive($fruits, ‘test_print’);
which has 2 arguments, whereas:
the program at: array_walk_recursive_link_in the sitepoint
shows 3 arguments:
array_walk_recursive($Color, ‘array_change_value_case’, CASE_LOWER);
The manual also provides one example like:
array_walk_recursive($fruits, ‘test_print’, ’ … Bio’);
The user defined call-back function that will be applied to each element of data.
An optional (default value of null) user argument that will be passed through to the call-back function as its 3rd input parameter. This allows you to supply a call-time parameter through to the call-back function, without breaking program scope.
That’s just a literal string value with an obvious and distinguishable appearance, so that you can tell in the output what it contributed to the result - generates
“a beinhaltet Apfel … Bio”
“Callable” means that the variable contains the name of a function that can be called. “Mixed” means that it is any type of variable. Because that optional third parameter type depends on the user-defined function provided in parameter 2, PHP cannot know what type of variable it might be.