r/lolphp • u/i_make_snow_flakes • Nov 15 '14
new safe casting function RFC. casting "-10" to string is valid but casting "+10" is not..
here the comment where one user asked the author of RFC about this. I am not able to follow his reasoning. What do you think?
22
Upvotes
View all comments
Show parent comment
5
u/[deleted] Nov 15 '14
All that would be a good argument, if you were not supporting negative signs while ignoring positive signs. As it stands, you're supporting casting -10 but not +10. that's what makes it an lol, like the rest of PHP.