Re: is_numeric_string an hexadecimal numbers ("123" == "0x7B")
| From: | Pierre Joye | Date: | Tue, 17 Apr 2012 11:28:37 +0000 |
| Subject: | Re: is_numeric_string an hexadecimal numbers ("123" == "0x7B") | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60072@lists.php.net to get a copy of this message | ||
hi!
On Tue, Apr 17, 2012 at 1:20 PM, Nikita Popov <nikita.ppv@googlemail.com> wrote:
> [3]:
> http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion
From the manual:
"If the string starts with valid numeric data, this will be the value
used. Otherwise, the value will be 0 (zero). Valid numeric data is an
optional sign, followed by one or more digits (optionally containing a
decimal point), followed by an optional exponent. The exponent is an
'e' or 'E' followed by one or more digits. "
So no problem from to change this confusing behavior.
Cheers,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org