Skip to content

Stdlib: RequestParseBodyException + request_parse_body() missing on 8.4 profile (pairs #5965, ext/standard/http.c) #16927

Description

@PurHur

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

  • PHP_COMPILER_PROFILE=8.4: RequestParseBodyException registered; request_parse_body() parses simple application/x-www-form-urlencoded and multipart/form-data bodies per php-src
  • Default 8.2 reference profile: symbols withheld like Zend 8.2
  • Compliance .phpt under test/compliance/cases/stdlib/request_parse_body_*.phpt
  • php-src-strict; no php-compiler-strict shortcut

Activity

  1. added
    enhancementNew feature or request
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    area:webWeb / CGI / superglobals
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jul 6, 2026
  2. PurHur commented on Jul 6, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — starting this run

  3. PurHur commented on Jul 6, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — starting this run

  4. PurHur commented on Jul 6, 2026

    @PurHur
    OwnerAuthor

    Merged via PR #16938.

    Verification (Docker):

    • VM repro (urlencoded + multipart): hi
      t.txt
      text/plain
      0
      7
      payload
    • AOT lint:
    • Tests: PHPUnit 9.6.21 by Sebastian Bergmann and contributors.

    ..... 5 / 5 (100%)

    Time: 00:01.525, Memory: 28.00 MB

    OK (5 tests, 5 assertions)

    • Regenerated docs: Wrote /app/var/workspaces/df5c09f3-f3b0-4677-ae37-c50b0f28ea80/repo/docs/capabilities.md (915 builtins). + Wrote /app/var/workspaces/df5c09f3-f3b0-4677-ae37-c50b0f28ea80/repo/docs/pages/capability-comparison.html (language 89, builtins 915)
  5. PurHur commented on Jul 6, 2026

    @PurHur
    OwnerAuthor

    Merged via #16939.

    Verification (PHP_COMPILER_PROFILE=8.4):

    • request_parse_body() + RequestParseBodyException registered
    • urlencoded + multipart repros green on VM
    • vendor/bin/phpunit --filter request_parse_body — OK (10 tests)
    • php bin/compile.php -l on urlencoded repro — lint_ok

    AOT runtime fixtures remain blocked on LLVM bridge compile; VM+JIT compliance guards behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinearea:webWeb / CGI / superglobalsenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions