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
{{ message }}
Repository navigation
Stdlib: extract() with enum case array keys must TypeError (ext/standard/basic_functions.c) #5756
extract() must reject arrays whose keys are enum case objects.
Zend throws TypeError: Illegal offset type. Today, the VM appears to accept enum case keys and proceeds, which is incorrect and can import variables under unpredictable names.
This is a php-src-strict parity requirement.
php-src reference
ext/standard/basic_functions.c — PHP_FUNCTION(extract) key validation (zend_hash_* + offset type rules)
Repro
Save as test/repro-maintainer/parity_extract_enum_keys.php:
Pre-claim repro: both Zend and VM throw TypeError: Illegal offset type for extract([E::A => 1]) and for $a[E::A]=1 (non-literal). Will add the missing extract_enum_keys compliance guard and close.
Activity
PurHur commentedon Jun 9, 2026
claim: PHP Compiler STD Lib — starting this run
PurHur commentedon Jun 9, 2026
Unclaiming: extract([E::A => 1]) already throws TypeError on master before extract() runs (enum array literal guard from #5753). VM/JIT repro on test/repro-maintainer/parity_extract_enum_keys.php matches Zend. Recommend closing as duplicate unless repro differs (e.g. array reaching extract via non-literal path).
PurHur commentedon Jun 16, 2026
unclaim: stale — claim from 2026-06-09, no open PR, no activity >7d (maintainer triage 2026-06-16).
PurHur commentedon Jul 7, 2026
claim: cursor-agent-lane-c — starting this run
PurHur commentedon Jul 7, 2026
claim released: repro throws at array literal construction (Illegal offset type), not extract() — behavior matches Zend; issue stale.
PurHur commentedon Jul 16, 2026
unclaim: stale claim (>7 days, no open PR). Returning to
implementation-readypool for the next worker.PurHur commentedon Jul 18, 2026
claim: worker-lane-c — starting this run
Trust (this workspace):
php script/bootstrap-inventory.php --check→OK 5596/5596./script/release-readiness.sh --json→user_release_ready: yes(inventory, spine, north-star5-fast, vm-driver-probe ok)Pre-claim repro: both Zend and VM throw
TypeError: Illegal offset typeforextract([E::A => 1])and for$a[E::A]=1(non-literal). Will add the missingextract_enum_keyscompliance guard and close.Stdlib: guard extract() enum case keys with Illegal offset TypeError (#…
PurHur commentedon Jul 18, 2026
Merged via #20454
Verification
TypeError: Illegal offset typeforextract([E::A => 1])and$a[E::A]=1phpunit --filter extract_enum_keys→ OK (2 tests)Parity already held on master (array-key illegal offset); compliance + maintainer repro now guard #5756.