Problem
#275 closed with VM-only extract() / compact() in ext/standard/extract_.php, compact_.php, VmScope.php. docs/capabilities.md shows:
| Function |
VM |
JIT |
AOT |
extract |
yes |
no |
no |
compact |
yes |
no |
no |
JIT stubs throw LogicException('not implemented for JIT in this compiler build'). Template-heavy apps may use explicit locals today (#471 layout pattern), but frameworks expect extract($data) before include.
Goal
JIT + AOT fast paths (or VM callout) for:
extract(array $vars, int $flags = EXTR_SKIP) — string keys only, EXTR_SKIP minimum
compact('a', 'b', …) — literal string name list (existing VM restriction)
Implementation hints
| Area |
Files |
Notes |
| JIT builtins |
lib/JIT/Builtin/ new handlers or extend VmScope callout |
Import keys into active LLVM scope |
| AOT |
runtime helper shared with VM |
Symbol php_compiler_extract |
| Tests |
test/compliance/cases/extract_template.phpt |
extract + echo variable |
| Matrix |
script/capability-matrix.php --check |
Flip JIT/AOT columns to yes |
Acceptance criteria
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
php bin/jit.php -r '$t=["name"=>"Dev"]; extract($t); echo $name;'
Prints Dev without LogicException.
Verification (local / Docker only)
./script/ci-local.sh --filter extract
Dependencies
Related
Problem
#275 closed with VM-only
extract()/compact()inext/standard/extract_.php,compact_.php,VmScope.php.docs/capabilities.mdshows:extractcompactJIT stubs throw
LogicException('not implemented for JIT in this compiler build'). Template-heavy apps may use explicit locals today (#471 layout pattern), but frameworks expectextract($data)beforeinclude.Goal
JIT + AOT fast paths (or VM callout) for:
extract(array $vars, int $flags = EXTR_SKIP)— string keys only,EXTR_SKIPminimumcompact('a', 'b', …)— literal string name list (existing VM restriction)Implementation hints
lib/JIT/Builtin/new handlers or extendVmScopecalloutphp_compiler_extracttest/compliance/cases/extract_template.phptscript/capability-matrix.php --checkAcceptance criteria
Prints
Devwithout LogicException.Verification (local / Docker only)
Dependencies
Related
ext/standard/VmScope.php