Re: _SERVER & HTTP_SERVER_VARS
| From: | derick@php.net | Date: | Wed, 05 Dec 2001 06:31:21 +0000 |
| Subject: | Re: _SERVER & HTTP_SERVER_VARS | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72543@lists.php.net to get a copy of this message | ||
Hello,
The new $_* arrays are also superglobals, ie. you don't need to define
them as 'global $HTTP_POST_VARS;' in your functions. The $_* arrays can be
used everywhere.
Derick
On Tue, 4 Dec 2001, Prottoss wrote:
> I've recently installed php 4.1.0RC5 on a test system and while testing the
> build came across an interesting fact.
>
> It would appear that the new PHP creates an identical copy of every system
> generated global array, for example _SERVER & HTTP_SERVER_VARS or _COOKIE &
> HTTP_COOKIE_VARS.
> Is there a reason why those were created twice?
>
> The phpinfo() appears to be using the new format of global arrays, which
> start with _, does this mean the long global array names will be phased out
> in the near future?
>
> Regards,
>
>
> --
> Prottoss
> webmaster@mediaminer.org
> ICQ: 23361082
> http://mediaminer.org/
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>