Category
php-in-php — shrink HTTP header stack LLVM
Problem
HTTP response header bookkeeping for JIT/AOT lives in PendingHeadersRuntime.php (~1,083 lines LLVM) managing pending header lists, headers_sent() state, and related globals — parallel to PHP web helpers already used on the VM path.
This duplicates semantics that should live in ext/standard/VmHttp*.php / lib/Web/ and compile through the normal pipeline.
php-src reference
Repro
wc -l lib/JIT/Builtin/PendingHeadersRuntime.php
./script/docker-exec.sh -- php bin/vm.php -r '
header("X-Test: 1");
var_export(headers_sent());
var_export(header_list());
'
# JIT/AOT must match after migration:
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php -r "
header(\"X-Test: 1\");
var_export(headers_sent());
"'
Scope (this repo)
| Path |
Work |
ext/standard/VmHttp.php / VmHttpResponse.php |
SSOT pending header list + sent flag |
lib/JIT/Builtin/PendingHeadersRuntime.php |
Thin bridge only |
lib/JIT/Builtin/HttpResponseCode.php |
Coordinate with #9344 migration |
| Tests |
test/compliance/cases/web/headers_sent.phpt, @group serve |
Done when
Related
Category
php-in-php— shrink HTTP header stack LLVMProblem
HTTP response header bookkeeping for JIT/AOT lives in
PendingHeadersRuntime.php(~1,083 lines LLVM) managing pending header lists,headers_sent()state, and related globals — parallel to PHP web helpers already used on the VM path.This duplicates semantics that should live in
ext/standard/VmHttp*.php/lib/Web/and compile through the normal pipeline.php-src reference
main/SAPI.c—sapi_header_op(),sapi_send_headers()ext/standard/head.c—header(),headers_sent(),header_remove(),header_register_callback()Repro
Scope (this repo)
ext/standard/VmHttp.php/VmHttpResponse.phplib/JIT/Builtin/PendingHeadersRuntime.phplib/JIT/Builtin/HttpResponseCode.phptest/compliance/cases/web/headers_sent.phpt,@group serveDone when
PendingHeadersRuntime.php>80% line reduction; PHP owns semanticsexamples/001-SimpleWebstays greenRelated