I guess I was primarily thinking in the context of the anonymous
function being defined in your previous example. As such the parent
scope is known (or at least can be expected), unless (unknown to me)

It is known in compile-time. But functions are not called in compile-time. And in run-time, inside usort() - which could in other case be some kind of foo_sort() passing its second parameter to a dozen of other functions, one of which uses it to invoke comparator function - you can not know where the scope in which usort was called is with regard to the scope of the executing anonymous function. And if you took this function name and saved it in the variable - it could be that the scope it was defined in does not exist anymore.
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to