RE: [PHP] A quick question

From: Date: Wed, 11 Oct 2000 21:18:11 +0000
Subject: RE: [PHP] A quick question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-19705@lists.php.net to get a copy of this message
richard writes: > try this : > > if (!($value="206.20.254.3")) { (I'm not really responding to this, and someone else already mentioned it--but that's an assignment, not an equality test.) > echo "\$var = $value<BR>"; > } > > you must 'escape' the "$var" as it will think it is a variable not a > string, > and I have found that "!=" is unreliable ! > > richard Well, if it's unreliable, and you can back this up, you *really* need to submit a full bug report. != is a very basic thing which *must* be trustworthy. However, I have found that a) it always has done what I expected; and b) most folk who have problems with it are getting bitten by other things instead--usually, subtle type-conversion issues. Can you provide examples? -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben@netmill.fi| +----------------------------------------------------------------+

« previous php.general (#19705) next »