[doc-en] master: Document PHP 8.5 zlib default stream context and flock support (#5971)
| From: | Louis-Arnaud via GitHub | Date: | Thu, 05 Nov 2026 07:47:22 +0000 |
| Subject: | [doc-en] master: Document PHP 8.5 zlib default stream context and flock support (#5971) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23913@lists.php.net to get a copy of this message | ||
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-11-05T08:47:18+01:00
Commit: https://github.com/php/doc-en/commit/0baba6599fa96a354d01ce3592bee5d2d355e1ba
Raw diff: https://github.com/php/doc-en/commit/0baba6599fa96a354d01ce3592bee5d2d355e1ba.diff
Document PHP 8.5 zlib default stream context and flock support (#5971)
gzopen(), gzfile() and readgzfile() now use the default stream context
(GH-16883), and flock() works on zlib streams (GH-17668).
Changed paths:
M reference/filesystem/functions/flock.xml
M reference/zlib/functions/gzfile.xml
M reference/zlib/functions/gzopen.xml
M reference/zlib/functions/readgzfile.xml
Diff:
diff --git a/reference/filesystem/functions/flock.xml b/reference/filesystem/functions/flock.xml
index 2579c73bdcc5..047e9c811a2b 100644
--- a/reference/filesystem/functions/flock.xml
+++ b/reference/filesystem/functions/flock.xml
@@ -164,11 +164,13 @@ fclose($fp);
</para>
</note>
<note>
- <para>
+ <simpara>
May only be used on file pointers returned by <function>fopen</function>
for local files, or file pointers pointing to userspace streams that
implement the <function>streamWrapper::stream_lock</function> method.
- </para>
+ As of PHP 8.5.0, it may also be used on file pointers returned by
+ <function>gzopen</function>.
+ </simpara>
</note>
<warning>
<para>
diff --git a/reference/zlib/functions/gzfile.xml b/reference/zlib/functions/gzfile.xml
index c790c1ea4010..6028ad3514aa 100644
--- a/reference/zlib/functions/gzfile.xml
+++ b/reference/zlib/functions/gzfile.xml
@@ -66,6 +66,13 @@
Previously, it was of type <type>int</type>.
</entry>
</row>
+ <row>
+ <entry>8.5.0</entry>
+ <entry>
+ The default stream context (see <function>stream_context_set_default</function>)
+ is now used when opening the file. Previously, it was ignored.
+ </entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
diff --git a/reference/zlib/functions/gzopen.xml b/reference/zlib/functions/gzopen.xml
index f0bdd0c6c464..84bf15f957a6 100644
--- a/reference/zlib/functions/gzopen.xml
+++ b/reference/zlib/functions/gzopen.xml
@@ -90,6 +90,20 @@
Previously, it was of type <type>int</type>.
</entry>
</row>
+ <row>
+ <entry>8.5.0</entry>
+ <entry>
+ The default stream context (see <function>stream_context_set_default</function>)
+ is now used when opening the file. Previously, it was ignored.
+ </entry>
+ </row>
+ <row>
+ <entry>8.5.0</entry>
+ <entry>
+ <function>flock</function> can now be used on the returned file pointer.
+ Previously, it always returned &false;.
+ </entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
diff --git a/reference/zlib/functions/readgzfile.xml b/reference/zlib/functions/readgzfile.xml
index 54380b50a0e6..d7faea5e8f92 100644
--- a/reference/zlib/functions/readgzfile.xml
+++ b/reference/zlib/functions/readgzfile.xml
@@ -79,6 +79,13 @@
Previously, it was of type <type>int</type>.
</entry>
</row>
+ <row>
+ <entry>8.5.0</entry>
+ <entry>
+ The default stream context (see <function>stream_context_set_default</function>)
+ is now used when opening the file. Previously, it was ignored.
+ </entry>
+ </row>
</tbody>
</tgroup>
</informaltable>