This is not really a bug but more of an unexpected gotcha. If you pass in an array for $env and include a modified PATH, that path does not take effect in PHP itself when starting the process. So if you are trying to start an executable in the modified PATH by using just the executable name, PHP and the OS won't find it and therefore will fail to start the process.
The fix is to let PHP know about the modified PATH by calling putenv("PATH=" . $newpath) with the new path string so that the call to proc_open() will correctly locate the executable and successfully run it.