For some reason getenv("ANYSTRING") is causing an internal server error. getenv() without any arguments returns an array of environment variables as expected. I am running PHP 7.1.13 x86 Thread Safe using mod_fcgid on Apache Lounge VC15 2.4.27 (Win32) in Windows 10 x64.
I cannot simply use getenv() as this code is part of the composer framework and therefore I would rather not modify it (in EventDispatcher.php).
It appears that this is related to Bug #75794 and #75761, as adding the second parameter (local_only) to true resolves the crash, whereas setting this parameter to false or omitting it entirely causes the crash to reoccur.
Anyone have any thoughts on how to get around this issue?