Re: PHP 4.0 Bug #3712: $HTTP_GET_VARS["var"] and $var share memory
| From: | Zeev Suraski | Date: | Thu, 02 Mar 2000 20:11:27 +0000 |
| Subject: | Re: PHP 4.0 Bug #3712: $HTTP_GET_VARS["var"] and $var share memory | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-16313@lists.php.net to get a copy of this message | ||
This behavior was already restored in the latest CVS.
Zeev
On 2 Mar 2000 eric@generation-i.com wrote:
> From: eric@generation-i.com
> Operating system: Linux 2.2.14
> PHP version: 4.0 Beta 4
> PHP Bug Type: Scripting Engine problem
> Bug description: $HTTP_GET_VARS["var"] and $var share memory
>
> When I change $var it is simultanously changed in $HTTP_GET_VARS["var"]. This is
> causes definate migration issues when using $HTTP_GET_VARS. This is true for $HTTP_POST_VARS also.
> (and probably $HTTP_COOKIES_VARS too) I would prefer the old way where these were seperate
> variables but if the is is to be the "new way" it needs to be listed on the migration
> page.
>
> This is incredibly basic but it may speed up the testing. Call it with various values for test
> sent by get or post.
> print "test=$test<br>\n";
> print
> "HTTP_GET_VARS[test]=".$HTTP_GET_VARS["test"]."<br>\n";
> print
> "HTTP_POST_VARS[test]=".$HTTP_POST_VARS["test"]."<br>\n";
> print "<hr>\n";
> $test=2;
> print "test=$test<br>\n";
> print
> "HTTP_GET_VARS[test]=".$HTTP_GET_VARS["test"]."<br>\n";
> print
> "HTTP_POST_VARS[test]=".$HTTP_POST_VARS["test"]."<br>\n";
> print "<hr>\n";
> $HTTP_GET_VARS["test"]=3;
> $HTTP_POST_VARS["test"]=5;
> print "test=$test<br>\n";
> print
> "HTTP_GET_VARS[test]=".$HTTP_GET_VARS["test"]."<br>\n";
> print
> "HTTP_POST_VARS[test]=".$HTTP_POST_VARS["test"]."<br>\n";
>
>
>
>
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/