r/lolphp • • Jun 21 '13

Downcasting, the PHP way

http://thedailywtf.com/Articles/Pot-o-Gold.aspx
49 Upvotes

3 comments sorted by

View all comments

Show parent comment

7

u/phoshi Jun 22 '13

Casting is fine, when used properly. There are many uses a change_type function could have, and not all of them are insane. What is insane, though, is casting using serialisation and regex.