note 41094 deleted from types.comparisons by aidan
| From: | aidan@php.net | Date: | Mon, 24 Jan 2005 14:50:56 +0000 |
| Subject: | note 41094 deleted from types.comparisons by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83871@lists.php.net to get a copy of this message | ||
Note Submitter: ben dash xo at dubplates dot org
----
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.