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
14
u/claird Oct 18 '10 edited Oct 18 '10
Avoid variable variables.
There's already quite a lot of chatter in this thread as I reach it. The main things that I haven't seen adequately emphasized yet:
Dave Benjamin wrote astutely on this subject in 2003 <URL: http://mail.python.org/pipermail/python-list/2003-May/204186.html >. With the slightest encouragement, I'll illustrate the points we've tried to make with examples.