note 120071 added to reserved.variables.globals

From: Date: Thu, 20 Oct 2016 23:31:42 +0000
Subject: note 120071 added to reserved.variables.globals
Groups: php.notes 
Request: Send a blank email to php-notes+get-206934@lists.php.net to get a copy of this message
I finally found information about superglobals not being found in $GLOBALS: https://bugs.php.net/bug.php?id=65223&edit=2 ------------------------------------- [2013-07-09 12:00 UTC] johannes @php.net [...]super-globals (aka. auto globals) are not added to symbol tables by default for performance reasons unless the parser sees need. i.e. <?php $_SERVER; print_r($GLOBALS); ?> will list it. You can also control this using auto_gloals_jit in php.ini: http://www.php.net/manual/en/ini.core.php#ini.auto-globals-jit ------------------------------------- http://www.php.net/manual/en/language.variables.variable.php ------------------------------------- Warning Please note that variable variables cannot be used with PHP's Superglobal arrays within functions or class methods. The variable $this is also a special variable that cannot be referenced dynamically. ------------------------------------- ---- Server IP: 72.52.91.14 Probable Submitter: 2.37.110.33 ---- Manual Page -- http://php.net/manual/en/reserved.variables.globals.php Edit -- https://master.php.net/note/edit/120071 Del: integrated -- https://master.php.net/note/delete/120071/integrated Del: useless -- https://master.php.net/note/delete/120071/useless Del: bad code -- https://master.php.net/note/delete/120071/bad+code Del: spam -- https://master.php.net/note/delete/120071/spam Del: non-english -- https://master.php.net/note/delete/120071/non-english Del: in docs -- https://master.php.net/note/delete/120071/in+docs Del: other reasons-- https://master.php.net/note/delete/120071 Reject -- https://master.php.net/note/reject/120071 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206934) next »