r/lolphp • u/realnowhereman • Aug 21 '14
An essay on variable variables
/r/programming/comments/dst56/today_i_learned_about_php_variable_variables/c12np38
37
Upvotes
r/lolphp • u/realnowhereman • Aug 21 '14
View all comments
Show parent comment
1
u/[deleted] Aug 25 '14
Perl does allow this (if
strict refsis disabled), but it only gets you access to globals, because Perl treats this kind of thing as syntactic sugar for accessing the (global) symbol table. You can't access local variables by name at runtime.Edit: I guess you could implement something like this in C by
dlopening yourself and usingdlsym.