Problem
examples/003-MiniWebApp/public/index.php bootstraps the app with require-as-expression and a separate class load before dispatch:
$config = require __DIR__ . '/../config.php';
require __DIR__ . '/../src/Router.php';
$router = new Router($config);
$router->dispatch($method, $route);
#752 ✅ links the project; #764 tracks empty stdout on native execute. VM/phpc serve prints HTML — the gap is specific to AOT runtime through the compiled entry graph.
This path is distinct from #776 (void render* + template include) and #739 (isolated void+include fixture): if the entry TU mishandles require return values or class constructor wiring, dispatch may run with an empty config or never reach template output.
Goal
Native .phpc/bin/app executes the same bootstrap as VM:
Scope
Implementation hints
| Area |
Files |
Notes |
| Entry |
examples/003-MiniWebApp/public/index.php |
PATH_INFO + ?route= fallback |
| Manifest |
examples/003-MiniWebApp/phpc.json |
includes: Router.php, config.php |
| AOT compile |
lib/AOT/, lib/Compiler.php |
Compare VM path for require expr |
| Compare |
examples/001-SimpleWeb |
flat entry — green reference |
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 bytes; currently 0 (batch 52 harness verify).
Acceptance criteria
Dependencies
Verification
Local/Docker only — ./script/docker-ci-local.sh, make test-docker. Do not require GitHub Actions.
Links
Problem
examples/003-MiniWebApp/public/index.phpbootstraps the app with require-as-expression and a separate class load before dispatch:#752 ✅ links the project; #764 tracks empty stdout on native execute. VM/
phpc serveprints HTML — the gap is specific to AOT runtime through the compiled entry graph.This path is distinct from #776 (void
render*+ templateinclude) and #739 (isolated void+include fixture): if the entry TU mishandlesrequirereturn values or class constructor wiring, dispatch may run with an empty config or never reach template output.Goal
Native
.phpc/bin/appexecutes the same bootstrap as VM:config.phparray return populatesRouter(app_nameneedle in HTML)new Router($config)succeeds under AOT ABI (Language: Typed property array (private array $config) in VM/JIT/AOT #767 typedarrayproperty)Scope
requireused as expression (return value from included file)phpc.jsonincludes[]+ entrypublic/index.php(AOT: Honor phpc.json includes array in phpc build --project #452)test/fixtures/aot/)Implementation hints
examples/003-MiniWebApp/public/index.php?route=fallbackexamples/003-MiniWebApp/phpc.jsonincludes:Router.php,config.phplib/AOT/,lib/Compiler.phprequireexprexamples/001-SimpleWebReproduce (local / Docker)
Expect non-zero bytes; currently 0 (batch 52 harness verify).
Acceptance criteria
MiniWebAppfrom configMiniWebAppAotExecuteTestGET home assertion (or dedicated fixture PHPT)PhpcBuildProjectTest::testMiniWebAppBuildLinksNativeBinaryDependencies
private array $configVerification
Local/Docker only —
./script/docker-ci-local.sh,make test-docker. Do not require GitHub Actions.Links