note 41094 added to types.comparisons

From: Date: Tue, 30 Mar 2004 01:55:20 +0000
Subject: note 41094 added to types.comparisons
Groups: php.notes 
Request: Send a blank email to php-notes+get-67353@lists.php.net to get a copy of this message
further to my previous note, i had it explained to me that "php" == 0 is true because "php" is being compared as an integer, and is typecast to the integer 0. Thus, 0 == 0, and the comparison is true. However, in a boolean comparison, 0 == false but "php" == true. This means that PHPs implicit typecasting is *NOT TRANSITIVE* as one might expect it to be, since "php" == 0, but "php" == true and 0 == false. ---- Manual Page -- http://www.php.net/manual/en/types.comparisons.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41094 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41094&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41094&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67353) next »