Milestone
M5 — compiled bootstrap driver replaces Zend loop (parent #1492)
Problem
Every bootstrap gate still invokes php bin/compile.php for link/emit. M3 strict and M4 loop slice are green on harness 2026-05-27 (emit_path=native), but the production driver is not yet emitted by gen-1:
| Target |
Native emit via ./script/bootstrap-selfhost-helloworld-compile-bin.sh |
Notes |
examples/000-HelloWorld/example.php |
✅ |
M3 strict |
lib/Compiler.php |
✅ |
M3 sidecar fast path |
bin/compile.php |
❌ |
#2697 — link-time sidecar segfault |
bin/vm.php, src/cli_driver.php |
❌ |
#2699 |
Scope
| Path |
Work |
bin/compile.php |
Gen-0 output target; gen-1 must compile next revision |
test/selfhost/compiler_helloworld_smoke/compile_driver.php |
Native compile dispatch (PHP_COMPILER_M3_RUNTIME_COMPILE=1) |
script/bootstrap-selfhost-helloworld-compile-bin.sh |
M5 repro script (exists; extend for driver matrix) |
script/bootstrap-selfhost-link.sh |
Gen-0 Zend link (stays until cold boot #1416) |
| Bootstrap scripts |
Replace php bin/compile.php invocations with build/selfhost-compile-driver when green |
lib/JIT.php, lib/Cli/ |
Driver hot path lowering (#2697) |
Repro (today)
# Green M4 slice (not driver):
./script/docker-exec.sh -- bash -lc 'make bootstrap-loop-probe'
# M5 blocker — driver emit:
./script/docker-exec.sh -- bash -lc '
export PHP_COMPILER_M3_SOURCE=/compiler/bin/compile.php
export PHP_COMPILER_M3_OUT=/compiler/build/compile-php-aot
./script/bootstrap-selfhost-helloworld-compile-bin.sh
'
# helloworld_compile_smoke: parseAndCompile returned null — see #2697
Done when
Unblock order
#2697 bin/compile.php sidecar/AOT segfault
→ #2699 bin/vm.php + src/cli_driver.php
→ this issue (#1521) swap bootstrap scripts to compiled driver
→ #1416 vendor prelink (no composer at cold boot)
Links
#1492 · #2600 · #2697 · #2699 · #1416 · #1520 (stub retirement)
Milestone
M5 — compiled bootstrap driver replaces Zend loop (parent #1492)
Problem
Every bootstrap gate still invokes
php bin/compile.phpfor link/emit. M3 strict and M4 loop slice are green on harness 2026-05-27 (emit_path=native), but the production driver is not yet emitted by gen-1:./script/bootstrap-selfhost-helloworld-compile-bin.shexamples/000-HelloWorld/example.phplib/Compiler.phpbin/compile.phpbin/vm.php,src/cli_driver.phpScope
bin/compile.phptest/selfhost/compiler_helloworld_smoke/compile_driver.phpPHP_COMPILER_M3_RUNTIME_COMPILE=1)script/bootstrap-selfhost-helloworld-compile-bin.shscript/bootstrap-selfhost-link.shphp bin/compile.phpinvocations withbuild/selfhost-compile-driverwhen greenlib/JIT.php,lib/Cli/Repro (today)
Done when
bin/compile.php→ gen-1 drivermake bootstrap-selfhost-driver-smoke(or equivalent) uses compiled driver for a tiny fixture — nophp bin/compile.phpon emit stepdocs/bootstrap-selfhost.mdrow “Bootstrap driver” = compiled path ✅BOOTSTRAP_M5_DRIVER_GATE=1inci-local.shllvm tail; default-on follow-up after stableUnblock order
Links
#1492 · #2600 · #2697 · #2699 · #1416 · #1520 (stub retirement)