Skip to content
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

getenv vs $_ENV #499

Open
jeromegamez opened this issue Oct 25, 2024 · 0 comments
Open

getenv vs $_ENV #499

jeromegamez opened this issue Oct 25, 2024 · 0 comments
Assignees
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@jeromegamez
Copy link

Is your feature request related to a problem? Please describe.
getenv() and putenv are not thread-safe - unfortunately, I can't seem to find a reliable official source right now, but vlucas/dotenv and a Symfony discussion mention this.

Describe the solution you'd like
I'm wondering if it might make sense to use the $_ENV superglobal to get and set environment variables, for example with $value = getenv($key) ?: $_ENV[$key]; (simplified code to show my point).

@jeromegamez jeromegamez added the Type: Enhancement Most issues will probably ask for additions or changes. label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

No branches or pull requests

2 participants