[DOC-CVS] [doc-en] master: streamWrapper::stream_lock: document LOCK_NB as standalone mode (#5257)

[email protected] (Louis-Arnaud via GitHub) Wed, 13 May 2026 17:56:42 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-05-13T19:56:38+02:00

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

streamWrapper::stream_lock: document LOCK_NB as standalone mode (#5257)

Changed paths:
  M  reference/stream/streamwrapper/stream-lock.xml


Diff:

diff --git a/reference/stream/streamwrapper/stream-lock.xml b/reference/stream/streamwrapper/stream-lock.xml
index 02550850cae9..bf4cd63b1530 100644
--- a/reference/stream/streamwrapper/stream-lock.xml
+++ b/reference/stream/streamwrapper/stream-lock.xml
@@ -13,13 +13,13 @@
    <modifier>public</modifier> <type>bool</type><methodname>streamWrapper::stream_lock</methodname>
    <methodparam><type>int</type><parameter>operation</parameter></methodparam>
   </methodsynopsis>
-  <para>
+  <simpara>
    This method is called in response to <function>flock</function>, when
    <function>file_put_contents</function> (when <parameter>flags</parameter>
    contains <constant>LOCK_EX</constant>),
    <function>stream_set_blocking</function> and when closing the stream
    (<constant>LOCK_UN</constant>).
-  </para>
+  </simpara>
  </refsect1>
 
  <refsect1 role="parameters">
@@ -47,15 +47,13 @@
           <constant>LOCK_UN</constant> to release a lock (shared or exclusive).
          </simpara>
         </listitem>
-        <listitem>
-         <simpara>
-          <constant>LOCK_NB</constant> if you don't want
-          <function>flock</function> to block while locking.
-          (not supported on Windows)
-         </simpara>
-        </listitem>
        </itemizedlist>
       </para>
+      <simpara>
+       It is also possible to have <constant>LOCK_NB</constant> added as a
+       bitmask to one of the above operations, if the lock should not block
+       during the locking attempt (not supported on Windows).
+      </simpara>
      </listitem>
     </varlistentry>
    </variablelist>
@@ -64,16 +62,16 @@
 
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
-  <para>
+  <simpara>
    &return.success;
-  </para>
+  </simpara>
  </refsect1>
 
  <refsect1 role="errors"><!-- {{{ -->
   &reftitle.errors;
-  <para>
+  <simpara>
    Emits <constant>E_WARNING</constant> if call to this method fails (i.e. not implemented).
-  </para>
+  </simpara>
  </refsect1><!-- }}} -->