note 43093 added to types.comparisons
| From: | darkside at ambientshadow dot NOSPAM dot com | Date: | Wed, 09 Jun 2004 16:11:04 +0000 |
| Subject: | note 43093 added to types.comparisons | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70465@lists.php.net to get a copy of this message | ||
Oh, the insanity...
"If the string starts with valid numeric data, this will be the value used."
If this is true, then why the following:
(0 == "info") is FALSE; reason given, " 'inf' means infinity"
(0 == "inf") is TRUE; shouldn't it be false if it's comparing infinity to zero?
(0 == "infinity") is TRUE; what gives?
(0 == "infinita") is FALSE; my head asplode!
The "starts with valid numeric data" appears to apply to numbers...
(0 == "2") is FALSE, obviously
(0 == "2d") is FALSE
(0 == "p2p") is TRUE
... but textual representations don't seem to count...
(0 == "two") is TRUE
So, what's with "inf" and "infinity"?
php v 4.3.2
----
Manual Page -- http://www.php.net/manual/en/types.comparisons.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43093
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43093&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43093&report=yes
Search -- http://master.php.net/manage/user-notes.php