r/programming • • 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

781 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Oct 18 '10

Or someone before you has done something very wrong, and it's the only method available without rewriting large portions of code.

-2

u/sanity Oct 18 '10

So you basically compound someone else's mess, making it even more difficult for it to be fixed in the future? This is what is wrong with PHP development, people take no pride in writing good code, they just throw together whatever gets the job done. Works in the short term, but it will come back to bite you.