[DOC-CVS] [doc-en] master: request_parse_body: Clarify behavior when body already consumed (#5504)

[email protected] (Louis-Arnaud via GitHub) Tue, 21 Apr 2026 11:23:59 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2026-04-21T12:23:56+01:00

Commit: https://github.com/php/doc-en/commit/c78af136d0497e16230218083ce43448f1864272
Raw diff: https://github.com/php/doc-en/commit/c78af136d0497e16230218083ce43448f1864272.diff

request_parse_body: Clarify behavior when body already consumed (#5504)

Fixes #5270

Changed paths:
  M  reference/network/functions/request-parse-body.xml


Diff:

diff --git a/reference/network/functions/request-parse-body.xml b/reference/network/functions/request-parse-body.xml
index 2dea65b633bc..4cd516229ea5 100644
--- a/reference/network/functions/request-parse-body.xml
+++ b/reference/network/functions/request-parse-body.xml
@@ -37,8 +37,12 @@
 
   <caution>
    <simpara>
+    The request body can only be consumed once.
     <function>request_parse_body</function> consumes the request body without
     buffering it to the <literal>php://input</literal> stream.
+    Conversely, if the body has already been read (e.g. via
+    <literal>php://input</literal>), <function>request_parse_body</function>
+    will return empty data.
    </simpara>
   </caution>
  </refsect1>