Category
stdlib · php-src-strict · PHP 8.4 HTTP body parser
Problem
PHP 8.4 adds request_parse_body() and RequestParseBodyException for parsing raw HTTP request bodies without populating superglobals. On PHP_COMPILER_PROFILE=8.4, neither the function nor the exception class is registered despite http_get_last_response_headers() being available on the same profile.
Verified 2026-07-06 on master.
| Repro |
Zend 8.4 |
VM 8.4 (2026-07-06) |
class_exists('RequestParseBodyException') |
true |
false |
function_exists('request_parse_body') |
true |
false |
php-src reference
PHP implementation target
ext/standard/ — register RequestParseBodyException + request_parse_body() behind CompilerVersion 8.4 forward gate
- Reuse
lib/Web/MultipartParser.php / existing HTTP parsing helpers where possible (PHP-in-PHP)
- VM first; JIT/AOT lowering follow-up acceptable if gated in capability matrix
Repro
./script/docker-exec.sh -- bash -lc 'PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_request_parse_body_exception_forward_84.php'
# fail: RequestParseBodyException and request_parse_body() not registered
Done when
Category
stdlib· php-src-strict · PHP 8.4 HTTP body parserProblem
PHP 8.4 adds
request_parse_body()andRequestParseBodyExceptionfor parsing raw HTTP request bodies without populating superglobals. OnPHP_COMPILER_PROFILE=8.4, neither the function nor the exception class is registered despitehttp_get_last_response_headers()being available on the same profile.Verified 2026-07-06 on master.
class_exists('RequestParseBodyException')truefalsefunction_exists('request_parse_body')truefalsephp-src reference
ext/standard/http.c—request_parse_body(),RequestParseBodyExceptionPHP implementation target
ext/standard/— registerRequestParseBodyException+request_parse_body()behindCompilerVersion8.4 forward gatelib/Web/MultipartParser.php/ existing HTTP parsing helpers where possible (PHP-in-PHP)Repro
Done when
PHP_COMPILER_PROFILE=8.4:RequestParseBodyExceptionregistered;request_parse_body()parses simpleapplication/x-www-form-urlencodedandmultipart/form-databodies per php-src.phptundertest/compliance/cases/stdlib/request_parse_body_*.phpt