|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-12-03 17:53 UTC] nikic@php.net
-Status: Open
+Status: Duplicate
[2013-12-03 17:53 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 22:00:01 2025 UTC |
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