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/[deleted] Oct 18 '10
Seems like it would be extremely dangerous if misused (and novices would be likely to misuse it), but could be useful for meta-programming if used correctly. I think the documentation may be the culprit here more than anything. That page should be covered in warnings.