[doc-en] master: Docs/stream buffer size (#6141)

From: Date: Wed, 25 Nov 2026 12:15:29 +0000
Subject: [doc-en] master: Docs/stream buffer size (#6141)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-24018@lists.php.net to get a copy of this message
Author: Malek Kadri (malekkadri) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-11-25T13:15:25+01:00 Commit: https://github.com/php/doc-en/commit/c21008ee05e7100bcf9f9c9c97d4420838930ad3 Raw diff: https://github.com/php/doc-en/commit/c21008ee05e7100bcf9f9c9c97d4420838930ad3.diff Docs/stream buffer size (#6141) * Clarify stream_set_read_buffer buffering behavior * Clarify stream_set_write_buffer buffering behavior * Use simpara for inline-only read buffering documentation * Use simpara for inline-only write buffering documentation Changed paths: M reference/stream/functions/stream-set-read-buffer.xml M reference/stream/functions/stream-set-write-buffer.xml Diff: diff --git a/reference/stream/functions/stream-set-read-buffer.xml b/reference/stream/functions/stream-set-read-buffer.xml index 811c4814eaa4..0d946db094bc 100644 --- a/reference/stream/functions/stream-set-read-buffer.xml +++ b/reference/stream/functions/stream-set-read-buffer.xml @@ -32,12 +32,12 @@ <varlistentry> <term><parameter>size</parameter></term> <listitem> - <para> - The number of bytes to buffer. If <parameter>size</parameter> - is 0 then read operations are unbuffered. This ensures that all reads - with <function>fread</function> are completed before other processes are - allowed to read from that input stream. - </para> + <simpara> + A value of 0 disables read buffering, while a non-zero value enables it. + For streams using PHP's built-in read buffering, the buffer size is + determined by the stream's chunk size, which can be changed with + <function>stream_set_chunk_size</function>. + </simpara> </listitem> </varlistentry> </variablelist> diff --git a/reference/stream/functions/stream-set-write-buffer.xml b/reference/stream/functions/stream-set-write-buffer.xml index d428ef8f42d5..dd5fb7e9c368 100644 --- a/reference/stream/functions/stream-set-write-buffer.xml +++ b/reference/stream/functions/stream-set-write-buffer.xml @@ -13,10 +13,9 @@ <methodparam><type>resource</type><parameter>stream</parameter></methodparam> <methodparam><type>int</type><parameter>size</parameter></methodparam> </methodsynopsis> - <para> - Sets the buffering for write operations on the given <parameter>stream</parameter> - to <parameter>size</parameter> bytes. - </para> + <simpara> + Sets the buffering for write operations on the given <parameter>stream</parameter>. + </simpara> </refsect1> <refsect1 role="parameters"> @@ -34,12 +33,12 @@ <varlistentry> <term><parameter>size</parameter></term> <listitem> - <para> - The number of bytes to buffer. If <parameter>size</parameter> - is 0 then write operations are unbuffered. This ensures that all writes - with <function>fwrite</function> are completed before other processes are - allowed to write to that output stream. - </para> + <simpara> + A value of 0 disables write buffering, while a non-zero value requests + full buffering with the given size in bytes. + Support for write buffering and the interpretation of the requested size + depend on the stream. + </simpara> </listitem> </varlistentry> </variablelist>

« previous php.doc.cvs (#24018) next »