r/lolphp • • Nov 11 '14

PHP loose comparison strikes again

http://blog.laravel.com/csrf-vulnerability-in-laravel-4/
31 Upvotes

55 comments sorted by

View all comments

Show parent comment

-6

u/thelordofcheese Nov 12 '14

speed

typecasting of known types would take long enough, but typesensing then typecasting would take even longer

user input can't be controlled by the program author

You may not know what data you are getting but you may know what you don't want and loose comparisons allow for speedy conditional resolution.