'Incompatability' between php4b2 -> php4b4

From: Date: Sun, 27 Feb 2000 23:40:41 +0000
Subject: 'Incompatability' between php4b2 -> php4b4
Groups: php.version4 
Request: Send a blank email to php-version4+get-11093@lists.php.net to get a copy of this message
Hi, Upgrading from beta2 to beta4 I discovered a small incompatability. (I didn't try beta3). Sometime between b2 and b4 $HTTP_GET_VARS["foo"] and $foo was made to be _references_ to the same string. This is not a problem per se, but maybe it should be on the list of incompatabilities. At least I had a couple of scripts that failed because of this change. An small (yet pretty scary) example: <? $secret = "X"; if ($secret == $HTTP_GET_VARS["secret"]) print "You're in!"; else print "You're out!"; ?> This produces different result in b2 / b4 (when accessed with ?secret=Y or similar). I think it is common for people to A) Always use $HTTP_*_VARS and not the globals yet B) not having gpc_globals turned off (it's on in the default ini). In this case scripts may start to behave strange. I hope this hasn't been a topic already -- I don't follow this list closely. - Peter

« previous php.version4 (#11093) next »