Req #69359 [Asn]: provide a way to fetch the current environment variables
Edit report at https://bugs.php.net/bug.php?id=69359&edit=1
ID: 69359
Updated by: tyrael@php.net
Reported by: tyrael@php.net
-Summary: impelement environ() for fetching all environment
vars
+Summary: provide a way to fetch the current environment
variables
Status: Assigned
Type: Feature/Change Request
Package: Unknown/Other Function
PHP Version: master-Git-2015-04-02 (Git)
Assigned To: tyrael
Block user comment: N
Private report: N
New Comment:
after some discussion at the original Pull Request(1214) page, the consensus was that instead of
adding a new method we should change getenv() so when called without arguments it should return with
the environment variables as an array.
I also forget to mention another use-case for this feature request: even when $_ENV is populated it
gets populated on startup/first access(depending on auto_globals_jit) and $_ENV won't reflect
any environment changes after the initial population, which can be sometimes desired.
Previous Comments:
------------------------------------------------------------------------
[2015-04-02 20:36:46] tyrael@php.net
Description:
------------
$_ENV is only available when variables_order includes "E", some distros like ubuntu ship
with a php.ini where E is not part of variables_order, and currently there is no clean way to fetch
all of the environment vars if your script was executed that way.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69359&edit=1
Thread (3 messages)