At 17:54 24.02.2003, Jason Wong spoke out and said:
--------------------[snip]--------------------
>On Tuesday 25 February 2003 00:07, Siddharth Hegde wrote:
>
>> Is there any way I can creat my very own super global variables?
>
>All variables defined in the global scope can be accessed via $GLOBALS.
>
>So:
>
> $my_very_own_variable = 'whatnot';
>
>can be accessed anywhere as:
>
> $GLOBALS['my_very_own_variable']
>
>For consistency you might want to always refer to it as
>$GLOBALS['my_very_own_variable'], so:
>
> $GLOBALS['my_very_own_variable'] = 'whatnot';
--------------------[snip]--------------------
Yes, but the question was for a "superglobal", like $_REQUEST, $_POST,
$_GET, or $_SERVER, so he wants something like $_MYSUPERGLOBAL which is not
possible afaik.
If you have a look in main/main.c, there's an array called
"short_track_vars_names" at the very beginning, which is later on looped
and tits contents passed to zend_register_auto_global(), which in turn adds
the name to a hash structure for autoglobal identifier lookup. These names
are hardcoded and cannot be changed (except when you modify the
distribution source code and recompile).
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php