note 19934 deleted from language.types.boolean by goba

From: Date: Mon, 04 Nov 2002 12:55:54 +0000
Subject: note 19934 deleted from language.types.boolean by goba
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38950@lists.php.net to get a copy of this message
That's not right. True and false are no constants since PHP4 but values of the type boolean. If you try the code if (1 == true) echo "True. 1 and true are equal."; you will notice that 1 and true are considered equal. The operator === (and its oposite !==) however compares values type sensitive: if (1 === true) echo "False. True is no integer.";

« previous php.notes (#38950) next »