|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66223 Undefined variable: _GET
Submitted: 2013-12-03 06:30 UTC Modified: 2013-12-03 17:53 UTC
From: yky at yky dot pw Assigned:
Status: Duplicate Package: Testing related
PHP Version: 5.4.22 OS: windows7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: yky at yky dot pw
New email:
PHP Version: OS:


 [2013-12-03 06:30 UTC] yky at yky dot pw
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-03 17:53 UTC]
-Status: Open +Status: Duplicate
 [2013-12-03 17:53 UTC]
Duplicate of This behavior is classified Won't Fix and documented with the last note on
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC