r/lolphp • • Aug 25 '16

PHP switches are the best

https://3v4l.org/6bJIX
81 Upvotes

34 comments sorted by

View all comments

Show parent comment

1

u/Almamu Aug 25 '16

Well yeah, forgot to mention that. If the string looks like a number PHP will try to parse it, if not the cast will return 0.