note 78508 deleted from language.types.string by felipe
| From: | felipe@php.net | Date: | Sun, 23 Mar 2008 23:16:48 +0000 |
| Subject: | note 78508 deleted from language.types.string by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-137446@lists.php.net to get a copy of this message | ||
Note Submitter: bluej100@gmail
----
The '0e00' == '00' scientific notation strangeness is documented at http://us2.php.net/manual/en/language.operators.comparison.php:
"If you compare two numerical strings, they are compared as integers."
I don't see any documentation for the odd handling of hexadecimal strings, though.
var_dump(intval('0xf')) // int(0)
var_dump((int)'0xf') // int(0)
var_dump(0 + '0xf') // int(15)
var_dump('0xf' == 15) // bool(true)