Re: [PHP4BETA] 'Incompatability' between php4b2 -> php4b4

From: Date: Mon, 28 Feb 2000 05:23:27 +0000
Subject: Re: [PHP4BETA] 'Incompatability' between php4b2 -> php4b4
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-11103@lists.php.net to get a copy of this message
Hi, I think we should probably reverse this new patch. Although the way people should be working IMO, is only using $HTTP_GET_VARS[] and turning off gpc_globals, I think people who work with both of them on shouldn't be burnt by this change in behavior. And this would introduce strange behavior in quite a few legacy PHP 3 scripts which would be extremely hard to debug. Andi At 12:40 AM 2/28/00 +0100, Peter Andreasen wrote:
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 -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.version4 (#11103) next »