ID: 40339 Comment by: a at b dot c dot de Reported By: randallgirard at hotmail dot com Status: Open Bug Type: Feature/Change Request Operating System: Windows / Linux PHP Version: 5.2.0 New Comment:
I can't even make out what "misc features like variable variables which appear to utilize the local, then global scope if the var is not defined locally" is even referring to - I've never seen global variables leaking into the local scope without my asking for them. If your coding is so borked that you don't even know what variables you have or not you can get a list of local variables by taking get_defined_vars() and subtracting $GLOBALS. Previous Comments: ------------------------------------------------------------------------ [2007-06-25 13:11:37] michael at chunkycow dot com dot au This sounds totally bogus, I do not know of any other language that comes close to providing such a thing. If you have trouble keeping track of the scoping of a given variable it's an implementation/programmer problem not a language one. ------------------------------------------------------------------------ [2007-02-03 03:50:15] randallgirard at hotmail dot com Description: ------------ Just as there is a $GLOBALS var pointing to the global scope, there should also be a $SCOPE or $LOCALS var pointing to the current local, usually function/method scope. This would add alot of coding potential, and should be included in the language because of misc features like variable variables which appear to utilize the local, then global scope if the var is not defined locally. It would also greatly aid in debugging, as you could quickly and easily dump all var's in the scope... And, I'm sure others could find many more uses for such a feature. If such a feature allready exists, I'm sorry for my ignorance and I would greatly appreciate feedback informing me of how a local scope array could be accessed. THANKS!! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40339&edit=1