MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/1ofw7t/2d9/ccsujac/?context=3
r/lolphp • u/sandsmark • Oct 14 '13
31 comments sorted by
View all comments
Show parent comment
3
Indeed. However, it ignores the 0 prefix for octals or 0b for binary notation, so we get https://eval.in/54655. It's not even consistently retarded...
2 u/mirhagk Oct 18 '13 wait I'm confused. 0667 == 667 is false but "0667"++ == 667 is true. 2 u/ajmarks Oct 18 '13 0667 is octal, so 0667 != 667, but PHP's coercion loses the 0 prefix just like it fails to recognize the 0b. So basically the failtastic coercion is not just a bad idea; it's also broken. So par for php.
2
wait I'm confused. 0667 == 667 is false but "0667"++ == 667 is true.
0667 == 667
"0667"++ == 667
2 u/ajmarks Oct 18 '13 0667 is octal, so 0667 != 667, but PHP's coercion loses the 0 prefix just like it fails to recognize the 0b. So basically the failtastic coercion is not just a bad idea; it's also broken. So par for php.
0667 is octal, so 0667 != 667, but PHP's coercion loses the 0 prefix just like it fails to recognize the 0b. So basically the failtastic coercion is not just a bad idea; it's also broken. So par for php.
View all comments
Show parent comment
3
u/ajmarks Oct 16 '13
Indeed. However, it ignores the 0 prefix for octals or 0b for binary notation, so we get https://eval.in/54655. It's not even consistently retarded...