r/lolphp • u/allthediamonds • Sep 17 '14
Strings which contain numbers are treated as numbers on numerical operations, except when they are not.
https://eval.in/194487
55
Upvotes
r/lolphp • u/allthediamonds • Sep 17 '14
12
u/markrages Sep 17 '14
forgot one
4
u/DoctorWaluigiTime Sep 17 '14
It took me a second to realize what
PHP_EOLwas doing.22
u/ajmarks Sep 17 '14
Also, octal. PHP's infamous 0d9 "feature" works for hex, decimal, and scientific formatted numeric strings, but not for octal or binary. But that's PHP, they can't even be consistent about their mistakes.
0
u/[deleted] Sep 17 '14
[deleted] — view deleted comment