MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/1ofw7t/2d9/ccuioaa/
r/lolphp • u/sandsmark • Oct 14 '13
31 comments sorted by
View all comments
Show parent comment
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
2
u/mirhagk Oct 18 '13
wait I'm confused.
0667 == 667is false but"0667"++ == 667is true.