ID: 29866
Updated by: [EMAIL PROTECTED]
Reported By: reimer at webhostingtech dot de
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
PHP Version: Irrelevant
New Comment:
We're not perl ;-) and therefore are not going to create another way of
accessing globals while $GLOBALS perfectly does what we need.
Previous Comments:
------------------------------------------------------------------------
[2004-08-27 13:55:18] reimer at webhostingtech dot de
Description:
------------
This is not bug, but a feature request. Since the release 4.1 we all
use $_POST, $_GET, $_SESSION etc. for our scripting. I was just
wondering why we do not use $_GLOBALS to access variables outside the
class or function.
I think this would fit better than $GLOBALS :)
Reproduce code:
---------------
<?
$_REQUEST["foo"] = "foo";
$foo = "foo";
function foo() {
echo $_REQUEST["foo"]; // Works
echo $GLOBALS["foo"]; // Works
echo $GLOBALS["foo"]; // Does not work
}
?>
Expected result:
----------------
Prints foos and an error.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29866&edit=1