note 24244 deleted from ref.variables by maxim
| From: | maxim@php.net | Date: | Sat, 10 Aug 2002 20:17:27 +0000 |
| Subject: | note 24244 deleted from ref.variables by maxim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34787@lists.php.net to get a copy of this message | ||
I think the variables this workaround produces don't behave exactly like the variables defined
by php >= 4.1.0
Maxim Maletsky wrote:
--------------------------------------
function test() {
echo $_GET['some']; // will also work because a fake $_GET is GLOBAL
}
--------------------------------------
This WON'T work (at least it doesn't do for me) because fake $_GET is only in the global
scope. You have to use
function test() {
global $_GET;
echo $_GET['some'];
}
When using the real $_GET you don't have to do it, because the real one is SUPERGLOBAL (which
means "available in every scope")
lates, Cano2