-
Notifications
You must be signed in to change notification settings - Fork 8k
Implemented FR #69359 - impelement environ() for fetching all environment vars #1214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you should check wether PG(http_globals)[TRACK_VARS_ENV] is available before calling import_environment.. right?
|
or a normal way is to trigger global env's armor handler, then copy from PG(http_globals)[TRACK_VARS_ENV] as result.. |
|
for the record, the travis failure is the same(ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt) that we also have in php-src master, so not related to this change. |
|
@laruence I didn't want to use the http_globals as I didn't want to create any side effects from calling this function nor allow any caching. if you call environ() then add/update an environment var with putenv(), then you should see the changes after you call environ() again. |
|
pasting the discussion with @laruence from irc: |
|
In general, I'd suggest to just alter |
|
@bwoebi's idea of |
|
@bwoebi was trying to follow suite: http://man7.org/linux/man-pages/man7/environ.7.html but yeah, it feels a bit weird. let's see what others think. |
|
Well, PHP often mirrors C APIs and that is good. A function consisting on 3 lines is fine anyway, so far about simplicity :) Thanks. |
|
+1 on @bwoebi suggestion of changing |
|
@Tyrael I can see what you are trying to do, but I still think the zero arguments idea is much better though, but if |
|
I like the idea of |
|
I agree with getenv() without parameters being a better idea. |
|
+1 for getenv([NULL]) |
|
closed in favor of #1567 |
No description provided.