That is variables that are visible to anonymous functions iside a main function. I ask because array_walk_recursive allow for only one additional parameter, it would be nice to be able to reach some vars from anonymous functions without relying on constant compact and extract
That is variables that are visible to anonymous functions iside a main function. I
Share
Closure can:
Use
use(vars)to close over these variables in your function.Can’t post a link to the official use docu because php.net lacks there