note 41218 deleted from types.comparisons by aidan
| From: | aidan@php.net | Date: | Mon, 24 Jan 2005 14:50:35 +0000 |
| Subject: | note 41218 deleted from types.comparisons by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83870@lists.php.net to get a copy of this message | ||
Note Submitter: s dot kapfinger at gmx dot de
----
String conversion to numbers:
"The value is given by the initial portion of the string. If the string starts with valid
numeric data, this will be the value used.
Otherwise, the value will be 0 (zero)"
(0 == "info") is false because "inf" means infinity which is not equal to zero.
(0 == "iffo") is true as "iffo" does not begin with a numeric value and is
therefore converted to zero.
(false == "iffo") is false because here, "iffo" is compared to a bool and only
empty strings are equal to false