Re: [PHP] Super globals ?
Wong HoWang wrote: Hello, I want to know that is there any way to create a super global in PHP? Only with the runkit extension. Take a look: http://www.php.net/runkit Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Super globals ?
This one time, at band camp, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: Wong HoWang wrote: Hello, I want to know that is there any way to create a super global in PHP? Only with the runkit extension. Take a look: http://www.php.net/runkit This is exactly what $_GLOBALS is for, why not use it? Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Super globals ?
Kevin Waterson wrote: This one time, at band camp, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: Wong HoWang wrote: Hello, I want to know that is there any way to create a super global in PHP? Only with the runkit extension. Take a look: http://www.php.net/runkit This is exactly what $_GLOBALS is for, why not use it? Because he asked for superglobals, not globals. $GLOBALS (not $_GLOBALS) happens to be an example of a superglobal. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Super globals ?
This one time, at band camp, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: Because he asked for superglobals, not globals. $GLOBALS (not $_GLOBALS) meh, force of habit happens to be an example of a superglobal. and variable can be set within its scope, so why not use it? As we see in the manual at $GLOBALS _is_ a super global and available to all scopes within the script. http://www.php.net/manual/en/reserved.variables.php#reserved.variables.globals it refers to $GLOBALS as This is a 'superglobal', or automatic global, variable. gotta love the php manual kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Super globals ?
Kevin Waterson wrote: This one time, at band camp, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: Because he asked for superglobals, not globals. $GLOBALS (not $_GLOBALS) meh, force of habit happens to be an example of a superglobal. and variable can be set within its scope, so why not use it? As we see in the manual at $GLOBALS _is_ a super global and available to all scopes within the script. http://www.php.net/manual/en/reserved.variables.php#reserved.variables.globals it refers to $GLOBALS as This is a 'superglobal', or automatic global, variable. gotta love the php manual Exactly Kevin. What the OP wanted was to create another superglobal, just like $GLOBALS. The contents of $GLOBALS refer to the global variables, which are *not* all superglobals. The only superglobals by default in PHP (apart from $GLOBALS) are $_SERVER, $_GET, $_POST, and so on. He asked a question, and I provided the answer. Why he wants to do it is another question, but telling him to use $GLOBALS isn't answering his question, it's answering a different question, namely how to access the global variables. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Super globals ?
yes, I am asking how to start my own super global... And even a PHP beginner know that $GLOBALS is a array containing all the global variables and it is used in a function or a class. So I think no one will ask a question here which the answer is simply $GLOBALS. Any finally, thanks Jasper for the answer. Jasper Bryant-Greene [EMAIL PROTECTED] wrote:[EMAIL PROTECTED] Kevin Waterson wrote: This one time, at band camp, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: Because he asked for superglobals, not globals. $GLOBALS (not $_GLOBALS) meh, force of habit happens to be an example of a superglobal. and variable can be set within its scope, so why not use it? As we see in the manual at $GLOBALS _is_ a super global and available to all scopes within the script. http://www.php.net/manual/en/reserved.variables.php#reserved.variables.globals it refers to $GLOBALS as This is a 'superglobal', or automatic global, variable. gotta love the php manual Exactly Kevin. What the OP wanted was to create another superglobal, just like $GLOBALS. The contents of $GLOBALS refer to the global variables, which are *not* all superglobals. The only superglobals by default in PHP (apart from $GLOBALS) are $_SERVER, $_GET, $_POST, and so on. He asked a question, and I provided the answer. Why he wants to do it is another question, but telling him to use $GLOBALS isn't answering his question, it's answering a different question, namely how to access the global variables. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Super Globals
Hello, Yep, I just upgraded to 4.3.2-RC1 and now it works fine, thanks!. #Of. Adrian Portsmouth wrote: Hi Oscar, The super globals don't exist in the version of PHP you are using, they were only introduced PHP = 4.1.0 Kind Regards Ade www.phpscriptsearch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php