On 2008/07/18, at 19:06, Richard Quadling wrote:
2008/7/18 Moriyoshi Koizumi <[EMAIL PROTECTED]>:
running test1.php ends up with two lines of "bar", surprisingly.
This is somewhat confusing, but surely one of the things that could
not ever be done. This might be a great help when you use a PHP-
script file as a mark-up template.
Moriyoshi
It was my understanding that include-d functions were added to the
global scope (or I suppose the active namespace).
So, in that context, function b() use($a) {} should be getting the
$a from the global scope where $a == "foo".
I would say that getting 2 "bar"s is wrong.
Lexical scopes are completely irrelevant to which namespace the
function belongs to.
Moriyoshi
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php