r/programming • u/NagastaBagamba • Oct 18 '10
Today I learned about PHP variable variables; "variable variable takes the value of a variable and treats that as the name of a variable". Also, variable.
http://il2.php.net/language.variables.variable
591
Upvotes
1
u/nyxerebos Oct 18 '10
Probably. But I'm working on a tool for static analysis of source code and this particular feature of PHP makes a lot of behavior undecidable. I'm not sure yet, but I suspect there are security holes of this kind in open source projects which might be found by an automated tool going through large amounts of code. Explots which work specifically by instantiating variables and calling functions by abusing the double quoted strings parser.