note 114811 added to reserved.variables.environment
| From: | aasasdasdf at yandex dot ru | Date: | Tue, 08 Apr 2014 14:25:23 +0000 |
| Subject: | note 114811 added to reserved.variables.environment | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199226@lists.php.net to get a copy of this message | ||
Please note that writing to $_ENV does not actually set an environment variable, i.e. the variable
will not propagate to any child processes you launch (except forked script processes, in which case
it's just a variable in the script's memory). To set real environment variables, you must
use putenv().
Basically, setting a variable in $_ENV does not have any meaning besides setting or overriding a
script-wide global variable. Thus, one should never modify $_ENV except for testing purposes (and
then be careful to use putenv() too, if appropriate).
PHP will not trigger any kind of error or notice when writing to $_ENV.
----
Server IP: 195.54.192.44
Probable Submitter: 109.167.130.165
----
Manual Page -- http://php.net/manual/en/reserved.variables.environment.php
Edit -- https://master.php.net/note/edit/114811
Del: integrated -- https://master.php.net/note/delete/114811/integrated
Del: useless -- https://master.php.net/note/delete/114811/useless
Del: bad code -- https://master.php.net/note/delete/114811/bad+code
Del: spam -- https://master.php.net/note/delete/114811/spam
Del: non-english -- https://master.php.net/note/delete/114811/non-english
Del: in docs -- https://master.php.net/note/delete/114811/in+docs
Del: other reasons-- https://master.php.net/note/delete/114811
Reject -- https://master.php.net/note/reject/114811
Search -- https://master.php.net/manage/user-notes.php