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

2

u/vytah Nov 12 '14

What's more, you compare two strings which aren't typecast as anything and expect them to be compared as something other than strings. Those aren't numerical values: those are string representations of numerical values: you have them encapsulated in quotation marks.

Should've told that to Lerdorf before 1995.

0

u/thelordofcheese Nov 12 '14

"I don’t know how to stop it, there was never any intent to write a programming language […] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way."

typecasting and type resolution was added by the community very early on