note 11752 modified in Operators by torben

From: Date: Tue, 06 Mar 2001 00:47:30 +0000
Subject: note 11752 modified in Operators by torben
Groups: php.notes 
Request: Send a blank email to php-notes+get-11912@lists.php.net to get a copy of this message
logically, this is just plain wrong, but in php-land, it's right: 0 == false "" == false 0 == "" 0 == "0" try this with any other string that isn't the empty string, and i think that you'll find it evaluates to true. now, i'm a little rusty on basic set theory, but lemme see if i can remember lesson one: it goes something like, "the empty set is NOT EQUAL to the set with the empty set as its only element." i hope someday i'll check back on this little note, and some editor will have provided a worthy explanation as to why this was allowed. http://www.php.net/manual/operators.php

« previous php.notes (#11912) next »