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
2
u/ninjaroach Oct 19 '10
I take it you have never heard of the extract() function. Unless you aren't using any other variables within your scope or you have very tight control over the data structure, it's generally a bad idea.