Re: HTTP Environment Varialbles
| From: | Andrey Hristov | Date: | Thu, 06 Dec 2001 23:09:28 +0000 |
| Subject: | Re: HTTP Environment Varialbles | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76966@lists.php.net to get a copy of this message | ||
Searching Google :
http://php.weblogs.com/discuss/msgReader$934
List: php-dev
Subject: [PHP-DEV] PHP 4.0.7
From: Zeev Suraski <zeev@zend.com>
Date: 2001-08-08 18:48:19
As those of you who are subscribed to php-cvs may have noticed, Andi and I
implemented today the functionality I suggested to replace register_globals:
!!!- $_GET, $_POST, $_COOKIE, $_FILES, $_ENV and $_SERVER replace $HTTP_*_VARS
(the old vars still remain for downwards compatibility)!!!
- The new variables are auto-globals - they're available in all function
contexts - there's no need to import them using the 'global' statement or
reference them using $GLOBALS.
- $_REQUEST (this name might change) - includes the data from $_GET,
$_POST, $_COOKIE and $_FILES, all in one array, for those users who don't
really care to differentiate between the various types of input.
This change was my last major TODO item for PHP 4.0.7. At this point, we
should try to get PHP 4.0.7 out the door soon. I suggest we branch 4.0.7
away next Tuesday, and start the QA process. This should give people
enough time to make any final changes they want to put into 4.0.7.
One other idea I'd like to pitch is releasing 4.0.7 and 4.1.0
simultaneously, with the only difference between them being the default
value for register_globals. This would create lots of noise and encourage
people to start actually using the new $_GET&friends features, which can
otherwise go unnoticed.
Regards and best wishes,
Andrey Hristov
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-==-=-=--=-=
From: "Rasmus Lerdorf" <rasmus@php.net>
To: "Andrey Hristov" <ahristov@icygen.com>
Cc: "Alex Shi" <chpshi@netvigator.ca>; <php-general@lists.php.net>
Sent: Friday, December 07, 2001 12:49 AM
Subject: Re: [PHP] HTTP Environment Varialbles
> > var_dump($HTTP_SERVER_VARS);
> > var_dump($HTTP_POST_VARS);
> > var_dump($HTTP_GET_VARS);
> > var_dump($HTTP_COOKIE_VARS);
> > var_dump($HTTP_ENV_VARS);
> >
> > since 4.1.0 these are deprecated. Use
> > $_SERVER, $_POST, $_GET, $_COOKIE, $_ENV
>
> They are not deprecated. They will still work. $_* are slightly
> different in that they are auto-globals just like $GLOBALS. An
> auto-global does not need to be declared global inside a function.
>
> -Rasmus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>