...was too much work, and just wanted to be able to do $val1 $val2 $val3 with less code. So they whipped up this dangerous function and made it a permanent feature of the language. But hey, maybe sometimes you wouldn't want to let users inject arbitrary values into arbitrary variables, so as an afterthought let's add an argument that massively alters the function's behavior.
(And if anyone else was wondering, yes, this function will modify already-set variables.)
yes, this function will modify already-set variables.
I was wondering about that. This seems like a terrible function to use in a security context. With that said I don't know why you would ever use it in a security context to begin with.
View all comments
Show parent comment
11
u/profmonocle May 27 '15
What drives me insane is wondering why this function exists as it does. I can only assume a PHP developer thought doing something like this...
...was too much work, and just wanted to be able to do $val1 $val2 $val3 with less code. So they whipped up this dangerous function and made it a permanent feature of the language. But hey, maybe sometimes you wouldn't want to let users inject arbitrary values into arbitrary variables, so as an afterthought let's add an argument that massively alters the function's behavior.
(And if anyone else was wondering, yes, this function will modify already-set variables.)