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
Status (expanded 2026-06-03 — implementation-ready)
Child of #4377. Implement this issue before closing the umbrella.
Problem
#4377 tracks general get_defined_vars() symbol-table parity. Concrete gaps in ext/standard/VmScope.php::getDefinedVars() today:
global $x; — Zend's snapshot may include globals linked into the function scope; this build iterates eachNamedScopeSlot() and can diverge on which names appear.
unset($local) — Zend excludes unset locals; this build skips only TYPE_NULL via callerVarIsSet() but can still expose slots that Zend omits.
$GLOBALS entries — must not duplicate superglobal table keys incorrectly.
Root cause:VmScope::getDefinedVars() only iterated compile-time eachNamedScopeSlot() locals. extract() imports unknown names into $frame->dynamicLocals (#4826), so imported keys were absent from the snapshot.
Fix: Append initialized dynamicLocals in VM; union namedVariablesInScope() into JIT get_defined_vars() lowering.
Verification:
php bin/vm.php test/repro/maintainer_gap_get_defined_vars_extract.php # ok
php vendor/bin/phpunit --filter GetDefinedConstantsVars test/unit/GetDefinedConstantsVarsBuiltinTest.php # OK (6 tests)
Activity
PurHur commentedon Jun 9, 2026
claim: PHP Compiler STD Lib — starting this run
PurHur commentedon Jun 9, 2026
Unclaiming: all repros (#4517 global/unset, #4377 locals/global) already green on master. VM output matches Zend PHP 8.2 byte-for-byte. GetDefinedConstantsVars compliance PHPT green. Recommend closing as duplicate unless repro differs.
PurHur commentedon Jul 6, 2026
claim: cursor-agent-lane-c — starting this run
Stdlib: get_defined_vars() includes extract() dynamic locals (#4517) (#…
PurHur commentedon Jul 6, 2026
Merged via #16999.
Root cause:
VmScope::getDefinedVars()only iterated compile-timeeachNamedScopeSlot()locals.extract()imports unknown names into$frame->dynamicLocals(#4826), so imported keys were absent from the snapshot.Fix: Append initialized
dynamicLocalsin VM; unionnamedVariablesInScope()into JITget_defined_vars()lowering.Verification:
chore: drop 24 more stale maintainer_gap repros (wave30 batch 2, #16660…