note 24278 deleted from language.types.boolean by jmcastagnetto

From: Date: Mon, 12 Aug 2002 09:57:42 +0000
Subject: note 24278 deleted from language.types.boolean by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34841@lists.php.net to get a copy of this message
"CAT" is either getting converted to FALSE or 0, or 0.1 is getting treated as a string, because False gets echoed. $TestValue = 0.1; if ( $TestValue == "CAT" ) { echo "True"; } else { echo "False"; } But 0 is not getting converted to a string. "CAT" is either getting converted to FALSE or 0, because True gets echoed. $TestValue = 0; if ( $TestValue == "CAT" ) { echo "True"; } else { echo "False"; } "CAT" is being compared to "DOG", because False gets echoed. $TestValue = "DOG"; if ( $TestValue == "CAT" ) { echo "True"; } else { echo "False"; }

« previous php.notes (#34841) next »