Bug #16687 Updated: Constants not being interpreted in "variable variables"
| From: | eru@php.net | Date: | Tue, 02 Jul 2002 21:09:48 +0000 |
| Subject: | Bug #16687 Updated: Constants not being interpreted in "variable variables" | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-12868@lists.php.net to get a copy of this message | ||
ID: 16687
Updated by: eru@php.net
Reported By: lux@simian.ca
-Status: Open
+Status: Verified
Bug Type: Documentation problem
Operating System: Red Hat Linux 7.1
PHP Version: 4.2.0
Previous Comments:
------------------------------------------------------------------------
[2002-04-20 04:07:41] goba@php.net
Superglobals are named autoglobals or "auto global"s in many cases.
Because you need not use "global" to make it global... I personaly
think that superglobal is a better name for them (as used by Rasmus
first AFAIK), so I use this name.
--
Goba
------------------------------------------------------------------------
[2002-04-19 21:01:49] mfischer@php.net
By design ? hehe
Ok, I *think* it was not 'by design', I think this just turned out to
be the way it is after it has been implemented. I don't think while
writing the code and was kept in mind 'no, we do not want them not to
be accessible in functions with variable variables'.
Ok, so much. Versions of PHP has already been released, so we should
document it.
Btw, goba, using the search on php.net I couldn't find a single page
refering to the super globals ... ? (I haven't yet browser through the
manual index as I tend to find that annyoing)
------------------------------------------------------------------------
[2002-04-19 15:17:41] goba@php.net
I have already reported this problem, but nothing happened.
Superglobals seemed to be accessible with variable variables in the
global scope, but not in any local scope (inside a function). Derick
told me, that it is by design, but IMHO this is incosistent, and quite
ugly :((
--
Goba
------------------------------------------------------------------------
[2002-04-19 14:53:51] mfischer@php.net
Reclassified.
It should be documented that due the special way super globals are
treated the cannot be used with variable variables.
------------------------------------------------------------------------
[2002-04-19 12:40:50] mfischer@php.net
True true. Derick (or someone else) mind briefly explaining why this
is/has to be different?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16687
--
Edit this bug report at http://bugs.php.net/?id=16687&edit=1