note 43362 deleted from types.comparisons by aidan
| From: | aidan@php.net | Date: | Mon, 24 Jan 2005 14:50:24 +0000 |
| Subject: | note 43362 deleted from types.comparisons by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83869@lists.php.net to get a copy of this message | ||
Note Submitter: darkside at ambientshadow dot com
----
The previous comment " 'inf' means infinity which is not equal to zero" may not
explain the entire situation.
Testing using the ternary operator -- echo (0 == "stringHere") ? "TRUE " :
"FALSE "; -- the results are interesting:
(0 == "info") is FALSE; our baseline
(0 == "infa") is FALSE; "inf" plus any additional lowercase character seems to
be FALSE
(0 == "inf") is TRUE; "inf" doesn't appear to mean infinity
(0 == "infinity") is TRUE; "infinity" doesn't even appear to mean infinity
Furthermore, this is just plain baffling:
(0 == "infinit") is FALSE; huh?
(0 == "infinitx") is FALSE; only "infinity" is TRUE -- replace 'y'
with any other lowercase character, and it's FALSE
testing on v 4.3.7