Req #69359 [Asn]: provide a way to fetch the current environment variables

From: Date: Fri, 16 Oct 2015 16:56:37 +0000
Subject: Req #69359 [Asn]: provide a way to fetch the current environment variables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196649@lists.php.net to get a copy of this message
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)

« previous php.bugs (#196649) next »