note 102008 added to reserved.variables.globals
| From: | qubsoft at gmail dot com | Date: | Sat, 22 Jan 2011 19:46:12 +0000 |
| Subject: | note 102008 added to reserved.variables.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176011@lists.php.net to get a copy of this message | ||
Here's a function which returns an array of all user defined global variables:
function globals() {
$globals = $GLOBALS;
foreach (array(
'GLOBALS',
'_ENV',
'HTTP_ENV_VARS',
'_POST',
'HTTP_POST_VARS',
'_GET',
'HTTP_GET_VARS',
'_COOKIE',
'HTTP_COOKIE_VARS',
'_SERVER',
'HTTP_SERVER_VARS',
'_FILES',
'HTTP_POST_FILES',
'_REQUEST'
) as $var) {
unset($globals[$var]);
}
return $globals;
}
----
Server IP: 69.147.83.197
Probable Submitter: 76.76.233.140
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.globals.php
Edit -- https://master.php.net/note/edit/102008
Del: integrated -- https://master.php.net/note/delete/102008/integrated
Del: useless -- https://master.php.net/note/delete/102008/useless
Del: bad code -- https://master.php.net/note/delete/102008/bad+code
Del: spam -- https://master.php.net/note/delete/102008/spam
Del: non-english -- https://master.php.net/note/delete/102008/non-english
Del: in docs -- https://master.php.net/note/delete/102008/in+docs
Del: other reasons-- https://master.php.net/note/delete/102008
Reject -- https://master.php.net/note/reject/102008
Search -- https://master.php.net/manage/user-notes.php