#33409 [Opn->Bgs]: User-defined superglobals
| From: | derick@php.net | Date: | Mon, 20 Jun 2005 18:51:36 +0000 |
| Subject: | #33409 [Opn->Bgs]: User-defined superglobals | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80717@lists.php.net to get a copy of this message | ||
ID: 33409
Updated by: derick@php.net
Reported By: graced at monroe dot wednet dot edu
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux 2.4.21 (RHAS3)
PHP Version: 5.0.4
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
If one is marked as "Won't fix" why are you repeating the report?
Obviously we're not going to do it now either...
Previous Comments:
------------------------------------------------------------------------
[2005-06-20 20:33:36] graced at monroe dot wednet dot edu
Description:
------------
This is related to bug #18060, which is marked as "Won't fix", but I'd
like to add some input to it and can't.
It would be nice to have a programming construct that turns a regular
variable into a superglobal along the same lines as
$_GET/$_REQUEST/$_POST/$_SERVER/etc.
I have a large project that has a 'configuration' stored in the global
$CFG. Having to global this (or type $GLOBALS['CFG']) every time it
needs to be checked inside one of a multitude of functions is very time
consuming.
I'd rather be able to write:
superglobal $CFG;
just once, since it's much cleaner than having to remember to global it
everywhere.
If it's the programmer's discretion as to whether a variable is a
superglobal (rather than all variables being 'superglobal' like in some
other languages) it should avoid the "nasty global variable
side-effects" that other languages are prone to
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33409&edit=1