Bug #66223 [Opn->Dup]: Undefined variable: _GET
| From: | nikic@php.net | Date: | Tue, 03 Dec 2013 17:53:48 +0000 |
| Subject: | Bug #66223 [Opn->Dup]: Undefined variable: _GET | ||
| References: | 1 | Groups: | php.bugs php.qa |
| Request: | Send a blank email to php-bugs+get-183110@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66223&edit=1
ID: 66223
Updated by: nikic@php.net
Reported by: yky at yky dot pw
Summary: Undefined variable: _GET
-Status: Open
+Status: Duplicate
Type: Bug
Package: Testing related
Operating System: windows7
PHP Version: 5.4.22
Block user comment: N
Private report: N
New Comment:
Duplicate of https://bugs.php.net/bug.php?id=55493. This
behavior is classified Won't Fix and documented with the last note on http://www.php.net/manual/en/language.variables.superglobals.php.
Previous Comments:
------------------------------------------------------------------------
[2013-12-03 06:30:00] yky at yky dot pw
Description:
------------
In Class can't indirect use $_GETã$_POST etc;
Test script:
---------------
$_GET['yk'] = 'aabb';
$get = '_GET';
$tmp = $$get;
echo $tmp['yk']; //right
class yk{
public function get(){
$get = '_GET';
$tmp = $$get;
echo $tmp['yk'];
}
public function get2(){
$get = 'Atmp';
$Atmp = 'bbaa';
$tmp = $$get;
echo $tmp;
}
}
$yk = new yk();
$yk->get(); //error Undefined variable: _GET
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66223&edit=1