Problem
#752 closed and harness verify (batch 50, 2026-05-23) confirms phpc build --project examples/003-MiniWebApp exits 0 and writes .phpc/bin/app when vendor patches are applied.
Runtime parity is not there yet: executing the binary with the same CGI env as MiniWebAppVmCliTest / examples-web-smoke.sh returns exit 0 but empty stdout for home and hello routes.
# After build (Docker, patches applied):
cd examples/003-MiniWebApp
export QUERY_STRING=route=home REQUEST_METHOD=GET
./.phpc/bin/app # exit 0, len=0
export PATH_INFO=/hello QUERY_STRING=name=Dev REQUEST_METHOD=GET
./.phpc/bin/app # exit 0, no greeting
VM path (phpc serve / bin/vm.php) prints HTML — this is an AOT execute gap, not a link failure.
Goal
Native binary output matches VM for:
QUERY_STRING=route=home → HTML contains app_name from config.php
PATH_INFO=/hello + name=Dev → greeting string
- POST
/contact → thank-you template body
Scope
Implementation hints
| Area |
Files |
Notes |
| Entry |
examples/003-MiniWebApp/public/index.php |
PATH_INFO + ?route= fallback |
| Router |
src/Router.php |
: void methods, include templates |
| AOT runtime |
lib/AOT/, lib/VM.php superglobal refresh |
Compare with #49 / #665 001 green |
| Includes |
deploy tree / compile-time graph |
#452 includes[] order |
| Test |
test/unit/MiniWebAppAotExecuteTest.php (#747) |
runBinaryWithCgiEnv() helper |
Reproduce (local / Docker)
make docker-build-22
docker run --rm -i -w /compiler php-compiler:22.04-dev bash -lc '
tar -xf - && composer install -q && ./script/apply-patches.sh
php bin/phpc.php build --project examples/003-MiniWebApp
cd examples/003-MiniWebApp
QUERY_STRING=route=home REQUEST_METHOD=GET ./.phpc/bin/app | wc -c
'
Expect non-zero byte count; currently 0.
Acceptance criteria
Dependencies
Verification
Local/Docker only — ./script/docker-ci-local.sh --filter MiniWebAppAotExecuteTest (once added). No GitHub Actions.
Links
Problem
#752 closed and harness verify (batch 50, 2026-05-23) confirms
phpc build --project examples/003-MiniWebAppexits 0 and writes.phpc/bin/appwhen vendor patches are applied.Runtime parity is not there yet: executing the binary with the same CGI env as
MiniWebAppVmCliTest/examples-web-smoke.shreturns exit 0 but empty stdout for home and hello routes.VM path (
phpc serve/bin/vm.php) prints HTML — this is an AOT execute gap, not a link failure.Goal
Native binary output matches VM for:
QUERY_STRING=route=home→ HTML containsapp_namefromconfig.phpPATH_INFO=/hello+name=Dev→ greeting string/contact→ thank-you template bodyScope
public/index.phpgraph),Router::dispatch, templateincludeat runtime (AOT: Runtime include() of deploy-root PHP via phpc_deploy_path() #623), CGI env reads in compiled codeMiniWebAppAotExecuteTestacceptance from Testing: MiniWebAppAotExecuteTest CLI smoke (#485, #676 step 2) #747 / Testing: MiniWebApp AOT binary CLI execute smoke (tracked in #747, blocked #764) #485Implementation hints
examples/003-MiniWebApp/public/index.php?route=fallbacksrc/Router.php: voidmethods,includetemplateslib/AOT/,lib/VM.phpsuperglobal refreshincludes[]ordertest/unit/MiniWebAppAotExecuteTest.php(#747)runBinaryWithCgiEnv()helperReproduce (local / Docker)
Expect non-zero byte count; currently 0.
Acceptance criteria
MiniWebAppAotExecuteTestpasses in./script/ci-local.sh@group llvmexamples-aot-smoke.sh003 slice can enable after this + Testing: MiniWebAppAotExecuteTest CLI smoke (#485, #676 step 2) #747Dependencies
Verification
Local/Docker only —
./script/docker-ci-local.sh --filter MiniWebAppAotExecuteTest(once added). No GitHub Actions.Links