[doc-en] master: Clarify the output buffering note on the header() page (#5915)
| From: | Zotis Angelis via GitHub | Date: | Wed, 07 Oct 2026 10:33:47 +0000 |
| Subject: | [doc-en] master: Clarify the output buffering note on the header() page (#5915) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23817@lists.php.net to get a copy of this message | ||
Author: Zotis Angelis (angeliszotis)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-10-07T12:33:43+02:00
Commit: https://github.com/php/doc-en/commit/230f38ea2f25063e798f9390ab6b3fac6d486e8f
Raw diff: https://github.com/php/doc-en/commit/230f38ea2f25063e798f9390ab6b3fac6d486e8f.diff
Clarify the output buffering note on the header() page (#5915)
* Clarify the output buffering note on the header() page
The first note in the Notes section starts with "You can use output
buffering to get around this problem", but there is no problem mentioned
anywhere before it. The note that comes before it is the one about SAPI
support, and the paragraph it actually refers to is in the Description
section, where it says that header() must be called before any output is
sent.
Rewrote the opening so the note says what it is about without depending
on a paragraph in another section. The rest of the note is unchanged.
* header(): use simpara for the output buffering note
The DocBook style check flagged the note's para as inline-only.
Changed paths:
M reference/network/functions/header.xml
Diff:
diff --git a/reference/network/functions/header.xml b/reference/network/functions/header.xml
index 209b29bf1a24..52a81b70c0c7 100644
--- a/reference/network/functions/header.xml
+++ b/reference/network/functions/header.xml
@@ -246,15 +246,16 @@ header('Set-Cookie: name=value; Secure; Path=/; SameSite=None;
Partitioned;');
&reftitle.notes;
¬e.network.header.sapi;
<note>
- <para>
- You can use output buffering to get around this problem,
+ <simpara>
+ Output buffering can be used to avoid the requirement that nothing is
+ output before <function>header</function> is called,
with the overhead of all of your output to the browser being buffered
in the server until you send it. You can do this by calling
<function>ob_start</function> and <function>ob_end_flush</function>
in your script, or setting the <literal>output_buffering</literal>
configuration directive on in your &php.ini; or
server configuration files.
- </para>
+ </simpara>
</note>
<note>
<para>