php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3712 $HTTP_GET_VARS["var"] and $var share memory
Submitted: 2000-03-02 15:14 UTC Modified: 2000-03-02 18:37 UTC
From: eric at generation-i dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 4 OS: Linux 2.2.14
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 + 4 = ?
Subscribe to this entry?

 
 [2000-03-02 15:14 UTC] eric at generation-i dot com
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";

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-02 18:37 UTC] andi at cvs dot php dot net
This has been changed back to the old behavior in the latest CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC