Array_walk_recursive uses anonymous functions. it is found that my local phpStudy integrated environment PHP5.3.26 can pass in an anonymous function in the second parameter, but it is not supported to run php5.3.27 on the test linux host deployed on the company's intranet, a function name string must be passed in for execution. how can I set it to support anonymous functions?
Reply to discussion (solution)
The anonymous function can be used at the beginning of 5.3, so there should be no problem. We recommend that you paste the code and error information for analysis.
$ Arr = array (1, 2, 3, 4, 5 );
Array_walk_recursive ($ arr, function ($ value ){
Echo $ value;
});
E_WARNING, array_walk_recursive () expects parameter 2 to be a valid callback, no array or string given
================
Unless this function is defined, the function name is passed in as a string.
How many php versions do you use? echo phpversion.
It seems that this writing method is not supported
How many php versions do you use? echo phpversion.
5.3.27
============
It seems that this writing method is not supported
I can use phpstudy 5.3.26.
What is this?
5.3.26 or 5.3.27 or 5.3.29.
It is obviously a mistake in version maintenance. just change the version.
According to the general version maintenance rules, the minor version number is even, and the stability is high.
Now 5.5 has been officially released. What are the lower versions involved?