|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-08-27 13:57 UTC] derick@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 09:00:01 2025 UTC | 
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.