Stanislav Malyshev wrote:
FWIW, this doesn't work with the other superglobals (in function context):
[EMAIL PROTECTED]:~$ php -r '$_GET["foo"] = "bar"; function baz() { $get =
"_GET"; return ${$get}["foo"]; } $get = "_GET"; echo ${$get}["foo"],
baz(), "\n";'
bar
Notice: Undefined variable: _GET in Command line code on line 1

(this is documented)

Ouch... ok. But $_SCOPES[$foo] should work, shouldn't it?

$_SCOPE doesn't need to be that special... It can just be an object with overloaded array access... Whenever a dim is fetched for that object, check current_execute_data->prev->symbol_table for the variable and return that.

-Sara

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

Reply via email to