In javascript you can do something like this
arr.map(function(val) { return typeof val == 'array' ? val.map(arguments.callee) : val.doSomething(); });
This will recursively pass through arr
and apply doSomething
to each value.
Is there an equivalent JavaScript arguments.callee in PHP?
source share