Edit report at https://bugs.php.net/bug.php?id=66223&edit=1
ID: 66223 Updated by: ni...@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 -- PHP Quality Assurance Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php