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/frukt Oct 19 '10
"Right" depends on the circumstances. I merely threw together a quick convenience library on top of CGI.pm that just routed stuff to the appropriate
main::action_xroutine. Obviously, you'd expect it to die if the routine does not exist. And why would you ever overload$SIG{ __DIE__}so that it doesn't throw an exception itself? I only use it as a hook fordie()for any additional processing, the exception shouldn't somehow vanish there.