getenv() vs. $_ENV in PHP

后端 未结 7 1353
半阙折子戏
半阙折子戏 2020-12-05 02:00

What is the difference between getenv() and $_ENV?

Any trade-offs between using either?

I noticed sometimes getenv() g

7条回答
  •  难免孤独
    2020-12-05 02:13

    I found getenv() useful to avoid a strange PHP bug where sometimes $_SERVER and $_ENV was undefined if auto_globals_jit was enabled (creating the _SERVER and _ENV variables when they're first used). Since then I began to to use it.

提交回复
热议问题