|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-08-27 12:07 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Package: Scripting Engine problem
+Package: Program Execution
-PHP Version: 7.0.10
+PHP Version: 7.4
[2021-08-27 12:07 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 09:00:02 2025 UTC |
Description: ------------ Environment variables with hyphens in their names (e.g: `getenv('A-B')`) are lost when `proc_open` creates a child process (other process launching functions untested). Given that these appear to be valid (they're supported by 'env' on Ubuntu) and *worked under PHP 5* this seems to be a regression. Test script: --------------- https://gist.github.com/PeterJCLaw/23719e515c787e70b614f45392dc21aa Expected result: ---------------- -- SUBPROCESS START -- A-B=ZZZ FOO=BAR getenv("INNER"): aeiou getenv("INNER-VAR"): aeiou done command returned 0 -- SUBPROCESS END -- Actual result: -------------- -- SUBPROCESS START -- A-B= FOO=BAR getenv("INNER"): aeiou getenv("INNER-VAR"): done command returned 0 -- SUBPROCESS END --