note 43362 added to types.comparisons
| From: | darkside at ambientshadow dot com | Date: | Fri, 18 Jun 2004 19:54:13 +0000 |
| Subject: | note 43362 added to types.comparisons | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71298@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/types.comparisons.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43362
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43362&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43362&report=yes
Search -- http://master.php.net/manage/user-notes.php