Category
php-in-php · stdlib · shrink C/LLVM builtins · php-src-strict
Problem
phpinfo() / phpcredits() VM logic lives in ext/standard/VmInfo.php (PHP SSOT), but JIT/AOT still emit HTML via lib/JIT/Builtin/StringPhpinfoRuntime.php (~344 lines) calling __compiler_phpinfo / __compiler_phpcredits with duplicated LLVM string tables.
This duplicates Zend phpinfo() output assembly already modeled in PHP and blocks #1492 runtime shrink.
php-src reference
Repro (failure / drift today)
Save as test/repro/maintainer_gap_phpinfo_jit.php:
<?php
declare(strict_types=1);
ob_start();
phpinfo(INFO_GENERAL);
$vm = ob_get_clean();
echo strlen($vm), "\n";
echo str_contains($vm, 'PHP Version') ? "has_version\n" : "missing_version\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
wc -l lib/JIT/Builtin/StringPhpinfoRuntime.php ext/standard/VmInfo.php
php test/repro/maintainer_gap_phpinfo_jit.php
php bin/jit.php test/repro/maintainer_gap_phpinfo_jit.php 2>&1
grep -n StringPhpinfoRuntime lib/JIT/Builtin/Type.php | head
'
| Path |
Expected |
| VM |
non-empty HTML containing PHP Version |
| JIT |
same length band + same key sections as VM (no __compiler_phpinfo divergence) |
Scope (this repo)
| Layer |
Path |
| JIT shrink |
lib/JIT/Builtin/StringPhpinfoRuntime.php — delete HTML table LLVM |
| PHP SSOT |
ext/standard/VmInfo.php — shared by VM + JIT trampoline |
| Registration |
lib/JIT/Builtin/Type.php ensureLinked hook |
| Tests |
extend test/compliance/cases/stdlib/phpinfo*.phpt if present |
Do not grow runtime/*.c. Remove __compiler_phpinfo symbols when PHP path links.
Done when
Verification
make bootstrap-selfhost-vm-driver-execute-probe
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter Phpinfo'
Related
Category
php-in-php·stdlib· shrink C/LLVM builtins · php-src-strictProblem
phpinfo()/phpcredits()VM logic lives inext/standard/VmInfo.php(PHP SSOT), but JIT/AOT still emit HTML vialib/JIT/Builtin/StringPhpinfoRuntime.php(~344 lines) calling__compiler_phpinfo/__compiler_phpcreditswith duplicated LLVM string tables.This duplicates Zend
phpinfo()output assembly already modeled in PHP and blocks #1492 runtime shrink.php-src reference
ext/standard/info.c—phpinfo(),php_print_info()ext/standard/basic_functions.stub.php—INFO_*constantsext/standard/VmInfo.php,ext/standard/phpinfo.php,ext/standard/phpcredits.php,ext/standard/Module.phpRepro (failure / drift today)
Save as
test/repro/maintainer_gap_phpinfo_jit.php:PHP Version__compiler_phpinfodivergence)Scope (this repo)
lib/JIT/Builtin/StringPhpinfoRuntime.php— delete HTML table LLVMext/standard/VmInfo.php— shared by VM + JIT trampolinelib/JIT/Builtin/Type.phpensureLinkedhooktest/compliance/cases/stdlib/phpinfo*.phptif presentDo not grow
runtime/*.c. Remove__compiler_phpinfosymbols when PHP path links.Done when
phpinfo()/phpcredits()invoke compiled VmInfo PHP (no standalone LLVM HTML builder)INFO_GENERALsection keys (php-src-strict)StringPhpinfoRuntime.phpshrinks to thin trampoline or is deleted; PR cites lines removed./script/ci-fast.sh --filter Phpinfoor targeted compliance subset greenVerification
make bootstrap-selfhost-vm-driver-execute-probe ./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter Phpinfo'Related