note 126754 added to function.get-defined-vars
| From: | cmswares dot com at gmail dot com | Date: | Mon, 10 Jan 2022 11:27:56 +0000 |
| Subject: | note 126754 added to function.get-defined-vars | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217479@lists.php.net to get a copy of this message | ||
Be aware of what get_defined_vars() function returns in different contexts:
- In global scope, a list of all defined variables, whether superglobals, command line arguments or
user-defined variables
- In function scope, only a list of user-defined variables (both arguments and in-body definitions)
- In class/object method scope, does not return class/object properties;
Also, as of PHP 5.4, does not return $_ENV even where available.
For further details and scope tests/results, see https://github.com/php/doc-en/issues/1317
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 182.2.39.148)
----
Manual Page -- https://php.net/manual/en/function.get-defined-vars.php
Edit -- https://main.php.net/note/edit/126754
Del: integrated -- https://main.php.net/note/delete/126754/integrated
Del: useless -- https://main.php.net/note/delete/126754/useless
Del: bad code -- https://main.php.net/note/delete/126754/bad+code
Del: spam -- https://main.php.net/note/delete/126754/spam
Del: non-english -- https://main.php.net/note/delete/126754/non-english
Del: in docs -- https://main.php.net/note/delete/126754/in+docs
Del: other reasons-- https://main.php.net/note/delete/126754
Reject -- https://main.php.net/note/reject/126754
Search -- https://main.php.net/manage/user-notes.php