Req #69359 [Asn->Csd]: 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: provide a way to fetch the current environment
variables
-Status: Assigned
+Status: Closed
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:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
implemented it in master, expected to be released in php 7.1.0
Previous Comments:
------------------------------------------------------------------------
[2015-10-16 16:56:36] tyrael@php.net
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.
------------------------------------------------------------------------
[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)