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/giulianob Oct 18 '10
Actually, wrappers are commonly used for this reason. Let's see different things that are commonly wrapped: threading (pthread and/or windows threads), OpenGL, DirectX, db functions, and I could go on for days here...
What do those things have generally in common? They are pretty fking old. Just like PHP. It's 15 years old and was modeled after C. Even C got a wrapper for it's shitty string functions in C++.
What's silly is that a lot of people are bitching about PHP but don't bitch about other messy/error prone languages such as C. Pointers are just as misused as a lot of the crap in PHP. However, we're also ignoring the fact that there are tons of applications written in PHP and C that are extremely clean, follow good conventions, etc...
Anyways, don't bother typing a long response. I wouldn't want you to break a nail.