PHP 4.0 Bug #3712: $HTTP_GET_VARS["var"] and $var share memory
| From: | eric at generation-i dot com | Date: | Thu, 02 Mar 2000 20:14:05 +0000 |
| Subject: | PHP 4.0 Bug #3712: $HTTP_GET_VARS["var"] and $var share memory | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16312@lists.php.net to get a copy of this message | ||
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";