Edit report at http://bugs.php.net/bug.php?id=40339&edit=1

 ID:                 40339
 Updated by:         [email protected]
 Reported by:        randallgirard at hotmail dot com
 Summary:            new superglobal...
-Status:             Open
+Status:             Bogus
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   Windows / Linux
 PHP Version:        5.2.0
 Block user comment: N
 Private report:     N

 New Comment:

You can use get_defined_vars(). Adding a magic variable is quite
expensive,even when not used. And most people would never use it.


Previous Comments:
------------------------------------------------------------------------
[2009-01-20 09:56:31] a at b dot c dot de

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.

------------------------------------------------------------------------
[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/bug.php?id=40339&edit=1

Reply via email to