RE: [PHP] == vs = should generate a warning or error -- was: Why won't this work?

From: Date: Fri, 19 Jul 2002 23:01:39 +0000
Subject: RE: [PHP] == vs = should generate a warning or error -- was: Why won't this work?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108598@lists.php.net to get a copy of this message
> Wow, that should have been a quiz. I can't believe how many people > missed the == vs = thing and had all these elaborate answers. *grin* > > Which brings me to my point. Rasmus or any other PHP duder out there -- > what are the possibilities of adding a config option in php.ini to WARN > or ERROR when you try to use = instead of == in conditional checks like > that. That would suck since many many PHP programs use stuff like: while($row=mysql_fetch_row($result)) { ... } There is absolutely nothing wrong with doing an assignment in a conditional and if it generated a warning it would drive a lot of people crazy. -Rasmus

« previous php.general (#108598) next »