You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
putenv() with a malformed assignment string (no = name, e.g. "=x") must throw ValueError: putenv(): Argument #1 ($assignment) must have a valid syntax. VM returns false silently.
VM: putenv('=invalid') throws ValueError: putenv(): Argument #1 ($assignment) must have a valid syntax
JIT: same via putenv_invalid_syntax_jit.phpt
Valid KEY=value / unset forms unchanged
./vendor/bin/phpunit --filter "GetenvJitRuntimeShrinkTest|putenv_invalid_syntax" --exclude-group aot → OK (10 tests)
php bin/compile.php -l test/repro/maintainer_gap_putenv_invalid_syntax.php → OK (AOT lowering guard linked)
Implementation: VmEnv::assertValidPutenvSyntax() (php-src zif_putenv), mirrored in GetenvJitHelper + JitEnv::emitPutenvSyntaxGuard() for JIT/AOT.
Note: full native link/execute for putenv() remains blocked by a pre-existing standalone IR verify failure on master; AOT fixture deferred until that regression is fixed.
Activity
PurHur commentedon Jun 20, 2026
claim: PHP Compiler STD Lib — starting this run
Stdlib: putenv() invalid assignment throws ValueError (#10335) (#10353)
PurHur commentedon Jun 20, 2026
Merged via #10353.
Verification
putenv('=invalid')throwsValueError: putenv(): Argument #1 ($assignment) must have a valid syntaxputenv_invalid_syntax_jit.phptKEY=value/ unset forms unchanged./vendor/bin/phpunit --filter "GetenvJitRuntimeShrinkTest|putenv_invalid_syntax" --exclude-group aot→ OK (10 tests)php bin/compile.php -l test/repro/maintainer_gap_putenv_invalid_syntax.php→ OK (AOT lowering guard linked)Implementation:
VmEnv::assertValidPutenvSyntax()(php-srczif_putenv), mirrored inGetenvJitHelper+JitEnv::emitPutenvSyntaxGuard()for JIT/AOT.Note: full native link/execute for
putenv()remains blocked by a pre-existing standalone IR verify failure on master; AOT fixture deferred until that regression is fixed.