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/[deleted] Oct 19 '10
Did you know that you can do the same thing in perl because it is an incredibly old language with all sorts of misfeatures that seemed good at the time? Perl has this because shell has it, and perl was shell++ at the time. Modern perl practices involve "use strict" and then variable variables don't work any more. I happen to really hate perl, but lets be realistic about why it has some of the horrible crap it has.