Quote:
Originally Posted by Skyld
This is intentional since it allows extra notation to be correctly parsed:
PHP Code:
echo(float("1.0e4")); // 10000 echo(float("0xBC")); // 188
|
It's not like it'd be impossible to make a parser which only accepts those variants when a letter is encountered.
I also don't think it matters that this is "how it usually works" in dynamically-typed languages, since a lot of other languages do dumb things.
But the important fact is that this behavior already exists and bugs may be introduced if it is changed.