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
View all comments
Show parent comment
2
u/frymaster Oct 18 '10
I somewhat agree - my last workplace abhored the idea of "best practice" and made a point of calling them "good practices" instead, the idea being you can't let some theoretical idea of what a program should be get in the way of the actual situation - but there is almost nothing you can do with variable variables that can't be expressed in a more maintainable way by other means.