Re: Should $foo and $HTTP_GET_VARS["foo"] be references to each other?

From: Date: Mon, 28 Feb 2000 00:19:06 +0000
Subject: Re: Should $foo and $HTTP_GET_VARS["foo"] be references to each other?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-16082@lists.php.net to get a copy of this message
* Zeev Suraski (zeev@zend.com) [2000-02-26 22:55]: > What's the general consensus, if we can reach one... Should $foo and > $HTTP_GET_VARS["foo"] be references to each other? In other words, if one I think you should consider carefully the implications of introducing this change of behaviour. I can se merits of the new way, but is it important enough that you want to introduce another incompatibility for it? Look at this scary example: <? $secret="X"; if ($secret == $HTTP_POST_VARS["secret"]) #always true in php4b4 print "You're in"; ?> Granted, the above code is a simplified example, but it shows that reasonable sane code may be affected. I have had severel scripts fail after moving to php4b4 because of this change. Consider this a piece of evidence from real life use of PHP. I don't feel qualified to give advise as to which of the ways is the best.. I just posted a note to the PHP4BETA list regarding this issue. Didn't see this thread before now, so sorry for the redundancy. - peter -- ln -s /dev/random ~/.plan

« previous php.dev (#16082) next »