Hacker News new | past | comments | ask | show | jobs | submit login

It's PHP. Handling numbers in PHP is complicated enough that a reasonable person would not trust it by default.

https://www.php.net/manual/en/language.types.numeric-strings...




I know that PHP will treat a string as if it were a number if you try to use it in a context where number is expected; JS does the same thing. But why would that affect JSON deserialization in a way that makes numbers and strings indistinguishable in principle (causing the loss of precision as described here)?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: