PHP isset with variable name

I wont try to justify PHP hacking but I was working on a project that’s based on CodeIgniter. It’s on a cycle of heavy refactoring. I was wondering if I could do something like isset("variable_name"); similar to python "variable_name" in globals() Same idea with locals() in python. Thankfully, php has the equivalent of globals() being $GLOBALS which would return you all the variables declared so far. Now you can just write your own isset_varname(). get_defined_vars() is equivalent in php to locals(). in python. ...

January 18, 2012 · 1 min · NextDoorHacker