RE: [PHP] If statement being ignored by PHP

From: Date: Fri, 30 Jun 2000 14:48:39 +0000
Subject: RE: [PHP] If statement being ignored by PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-4040@lists.php.net to get a copy of this message
... > PHP is a bastard - this is one problem which gets everyone at one point. > For if statements, the operator is == to check if it is equal to - not just > a single = sign. This is due to the fact that PHP will parse that statement > even in an if statement [i.e. set $post="yes", not work out whether it > equals yes.] ... > Emile Axelrad At one point, I was teaching myself the Occam language. At first, it irritated me immensely that the assignment operator was := instead of just = . Now that I'm much older and wiser (well, at least the first), I begin to see the value of forcing such methods. Since we restrict ourselves to the Ascii keyboard characters (APL for building web pages? ... anyone?), we're going to all suffer on occassion from this grammar, and it can cause the most frustrating problems when it occurs. I suppose it wouldn't go over well to change PHP to use := ? Didn't think so. Regards, Billy

« previous php.general (#4040) next »