[DOC-CVS] [doc-en] master: Sync parameter type and name changes (#5073)

[email protected] (Máté Kocsis via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Máté Kocsis (kocsismate)
Committer: GitHub (web-flow)
Pusher: kocsismate
Date: 2026-01-14T22:09:32+01:00

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

Sync parameter type and name changes (#5073)

Co-authored-by: Gina Peter Banyard <[email protected]>

Changed paths:
  M  reference/ldap/functions/ldap-get-option.xml
  M  reference/openssl/functions/openssl-cms-encrypt.xml
  M  reference/pcntl/functions/pcntl-getcpuaffinity.xml
  M  reference/pcntl/functions/pcntl-setcpuaffinity.xml
  M  reference/pgsql/functions/pg-copy-from.xml
  M  reference/spl/splfileobject/fwrite.xml
  M  reference/zlib/functions/deflate_init.xml
  M  reference/zlib/functions/gzfile.xml
  M  reference/zlib/functions/gzopen.xml
  M  reference/zlib/functions/inflate_init.xml
  M  reference/zlib/functions/readgzfile.xml


Diff:

diff --git a/reference/ldap/functions/ldap-get-option.xml b/reference/ldap/functions/ldap-get-option.xml
index 292e7b461458..70714de75f9c 100644
--- a/reference/ldap/functions/ldap-get-option.xml
+++ b/reference/ldap/functions/ldap-get-option.xml
@@ -10,7 +10,7 @@
   &reftitle.description;
   <methodsynopsis>
    <type>bool</type><methodname>ldap_get_option</methodname>
-   <methodparam><type>LDAP\Connection</type><parameter>ldap</parameter></methodparam>
+   <methodparam><type class="union"><type>LDAP\Connection</type><type>null</type></type><parameter>ldap</parameter></methodparam>
    <methodparam><type>int</type><parameter>option</parameter></methodparam>
    <methodparam choice="opt"><type class="union"><type>array</type><type>string</type><type>int</type></type><parameter role="reference">value</parameter><initializer>&null;</initializer></methodparam>
   </methodsynopsis>
@@ -27,7 +27,9 @@
      <term><parameter>ldap</parameter></term>
      <listitem>
       <para>
-       &ldap.parameter.ldap;
+       Either an <classname>LDAP\Connection</classname> instance, returned by
+       <function>ldap_connect</function>, to get the option for that connection,
+       or &null; to get the global option.
       </para>
      </listitem>
     </varlistentry>
@@ -242,6 +244,12 @@
      </row>
     </thead>
     <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       <parameter>ldap</parameter> is now nullable.
+      </entry>
+     </row>
      &ldap.changelog.ldap-object;
     </tbody>
    </tgroup>
diff --git a/reference/openssl/functions/openssl-cms-encrypt.xml b/reference/openssl/functions/openssl-cms-encrypt.xml
index fc347594cfcd..b6508b26d7b7 100644
--- a/reference/openssl/functions/openssl-cms-encrypt.xml
+++ b/reference/openssl/functions/openssl-cms-encrypt.xml
@@ -16,7 +16,7 @@
    <methodparam><type class="union"><type>array</type><type>null</type></type><parameter>headers</parameter></methodparam>
    <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
    <methodparam choice="opt"><type>int</type><parameter>encoding</parameter><initializer><constant>OPENSSL_ENCODING_SMIME</constant></initializer></methodparam>
-   <methodparam choice="opt"><type>int</type><parameter>cipher_algo</parameter><initializer><constant>OPENSSL_CIPHER_AES_128_CBC</constant></initializer></methodparam>
+   <methodparam choice="opt"><type class="union"><type>string</type><type>int</type></type><parameter>cipher_algo</parameter><initializer><constant>OPENSSL_CIPHER_AES_128_CBC</constant></initializer></methodparam>
   </methodsynopsis>
   <para>
    This function encrypts content to one or more recipients,
@@ -80,7 +80,7 @@
     <term><parameter>cipher_algo</parameter></term>
     <listitem>
      <para>
-      A cypher to use.
+      A cipher to use.
      </para>
     </listitem>
    </varlistentry>
@@ -105,6 +105,13 @@
      </row>
     </thead>
     <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       <parameter>cipher_algo</parameter> is now of type <type>int</type> or <type>string</type>.
+       Previously, it was of type <type>int</type>.
+      </entry>
+     </row>
      <row>
       <entry>8.1.0</entry>
       <entry>
diff --git a/reference/pcntl/functions/pcntl-getcpuaffinity.xml b/reference/pcntl/functions/pcntl-getcpuaffinity.xml
index eea49f153d1a..1d130db0bbc6 100644
--- a/reference/pcntl/functions/pcntl-getcpuaffinity.xml
+++ b/reference/pcntl/functions/pcntl-getcpuaffinity.xml
@@ -9,11 +9,11 @@
  <refsect1 role="description">
   &reftitle.description;
   <methodsynopsis>
-   <type class="union"><type>bool</type><type>array</type></type><methodname>pcntl_getcpuaffinity</methodname>
-   <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>pid</parameter><initializer>&null;</initializer></methodparam>
+   <type class="union"><type>array</type><type>false</type></type><methodname>pcntl_getcpuaffinity</methodname>
+   <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>process_id</parameter><initializer>&null;</initializer></methodparam>
   </methodsynopsis>
   <simpara>
-   Retrieve the cpu affinity of the <parameter>pid</parameter>.
+   Retrieve the cpu affinity of the <parameter>process_id</parameter>.
   </simpara>
  </refsect1>
 
@@ -21,7 +21,7 @@
   &reftitle.parameters;
   <variablelist>
    <varlistentry>
-    <term><parameter>pid</parameter></term>
+    <term><parameter>process_id</parameter></term>
     <listitem>
      <simpara>
       If &null;, the current process ID is used.
@@ -43,11 +43,11 @@
   &reftitle.errors;
   <simpara>
    A <classname>ValueError</classname> is thrown when
-   <parameter>pid</parameter> is an invalid process id
+   <parameter>process_id</parameter> is an invalid process id
    or the cpu mask had failed to be created.
   </simpara>
   <simpara>
-   If <parameter>pid</parameter> is a process for which the current
+   If <parameter>process_id</parameter> is a process for which the current
    user has no allowed permission, a <constant>E_WARNING</constant>
    is emitted.
   </simpara>
diff --git a/reference/pcntl/functions/pcntl-setcpuaffinity.xml b/reference/pcntl/functions/pcntl-setcpuaffinity.xml
index d4ee8b6437ef..9bc7b7247d6e 100644
--- a/reference/pcntl/functions/pcntl-setcpuaffinity.xml
+++ b/reference/pcntl/functions/pcntl-setcpuaffinity.xml
@@ -10,12 +10,12 @@
   &reftitle.description;
   <methodsynopsis>
    <type>bool</type><methodname>pcntl_setcpuaffinity</methodname>
-   <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>pid</parameter><initializer>&null;</initializer></methodparam>
-   <methodparam choice="opt"><type>array</type><parameter>hmask</parameter></methodparam>
+   <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>process_id</parameter><initializer>&null;</initializer></methodparam>
+   <methodparam choice="opt"><type>array</type><parameter>cpu_ids</parameter><initializer>[]</initializer></methodparam>
   </methodsynopsis>
   <simpara>
-   Sets the cpu affinity for the <parameter>pid</parameter> with the cpu affinity mask given by
-   <parameter>hmask</parameter>.
+   Sets the cpu affinity for the <parameter>process_id</parameter> with the cpu affinity mask given by
+   <parameter>cpu_ids</parameter>.
   </simpara>
  </refsect1>
 
@@ -23,7 +23,7 @@
   &reftitle.parameters;
   <variablelist>
    <varlistentry>
-    <term><parameter>pid</parameter></term>
+    <term><parameter>process_id</parameter></term>
     <listitem>
      <simpara>
       If &null;, the current process ID is used.
@@ -31,7 +31,7 @@
     </listitem>
    </varlistentry>
    <varlistentry>
-    <term><parameter>hmask</parameter></term>
+    <term><parameter>cpu_ids</parameter></term>
     <listitem>
      <simpara>
       The cpu affinity mask comprised of one or more cpu id for binding the process to.
@@ -53,9 +53,9 @@
   &reftitle.errors;
   <simpara>
    A <classname>TypeError</classname> is thrown if one
-   of the cpu id from the <parameter>hmask</parameter> is invalid.
+   of the cpu id from the <parameter>cpu_ids</parameter> is invalid.
    A <classname>ValueError</classname> is thrown if
-   <parameter>pid</parameter> is an invalid process id
+   <parameter>process_id</parameter> is an invalid process id
    or the cpu mask had failed to be created.
   </simpara>
  </refsect1>
diff --git a/reference/pgsql/functions/pg-copy-from.xml b/reference/pgsql/functions/pg-copy-from.xml
index 66e95866b840..64bc42f7146b 100644
--- a/reference/pgsql/functions/pg-copy-from.xml
+++ b/reference/pgsql/functions/pg-copy-from.xml
@@ -15,7 +15,7 @@
    <type>bool</type><methodname>pg_copy_from</methodname>
    <methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
    <methodparam><type>string</type><parameter>table_name</parameter></methodparam>
-   <methodparam><type>array</type><parameter>rows</parameter></methodparam>
+   <methodparam><type class="union"><type>array</type><type>Traversable</type></type><parameter>rows</parameter></methodparam>
    <methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>"\t"</initializer></methodparam>
    <methodparam choice="opt"><type>string</type><parameter>null_as</parameter><initializer>"\\\\N"</initializer></methodparam>
   </methodsynopsis>
@@ -48,7 +48,7 @@
      <term><parameter>rows</parameter></term>
      <listitem>
       <para>
-       An <type>array</type> of data to be copied into <parameter>table_name</parameter>.
+       An <type>iterable</type> data to be copied into <parameter>table_name</parameter>.
        Each value in <parameter>rows</parameter> becomes a row in <parameter>table_name</parameter>.
        Each value in <parameter>rows</parameter> should be a delimited string of the values
        to insert into each field.  Values should be linefeed terminated.
@@ -95,6 +95,13 @@
      </row>
     </thead>
     <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       <parameter>rows</parameter> is now of type <type>iterable</type>.
+       Previously, it was of type <type>array</type>.
+      </entry>
+     </row>
      &pgsql.changelog.connection-object;
     </tbody>
    </tgroup>
diff --git a/reference/spl/splfileobject/fwrite.xml b/reference/spl/splfileobject/fwrite.xml
index 56aa534d3b64..182395a4e29c 100644
--- a/reference/spl/splfileobject/fwrite.xml
+++ b/reference/spl/splfileobject/fwrite.xml
@@ -11,7 +11,7 @@
   <methodsynopsis role="SplFileObject">
    <modifier>public</modifier> <type class="union"><type>int</type><type>false</type></type><methodname>SplFileObject::fwrite</methodname>
    <methodparam><type>string</type><parameter>data</parameter></methodparam>
-   <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam>
+   <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
   </methodsynopsis>
   <para>
    Writes the contents of <parameter>data</parameter> to the file
@@ -34,7 +34,7 @@
      <term><parameter>length</parameter></term>
      <listitem>
       <para>
-       If the <parameter>length</parameter> argument is given, writing will
+       If the <parameter>length</parameter> argument is <type>int</type>, writing will
        stop after <parameter>length</parameter> bytes have been written or
        the end of <parameter>data</parameter> is reached, whichever comes
        first.
@@ -63,6 +63,12 @@
      </row>
     </thead>
     <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       <parameter>length</parameter> is now nullable.
+      </entry>
+     </row>
      <row>
       <entry>7.4.0</entry>
       <entry>
diff --git a/reference/zlib/functions/deflate_init.xml b/reference/zlib/functions/deflate_init.xml
index 00fc914ae965..9bdcd2697ead 100644
--- a/reference/zlib/functions/deflate_init.xml
+++ b/reference/zlib/functions/deflate_init.xml
@@ -11,7 +11,7 @@
   <methodsynopsis>
    <type class="union"><type>DeflateContext</type><type>false</type></type><methodname>deflate_init</methodname>
    <methodparam><type>int</type><parameter>encoding</parameter></methodparam>
-   <methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
+   <methodparam choice="opt"><type class="union"><type>array</type><type>object</type></type><parameter>options</parameter><initializer>[]</initializer></methodparam>
   </methodsynopsis>
   <para>
    Initializes an incremental deflate context using the specified
diff --git a/reference/zlib/functions/gzfile.xml b/reference/zlib/functions/gzfile.xml
index 3d98ed39235c..c790c1ea4010 100644
--- a/reference/zlib/functions/gzfile.xml
+++ b/reference/zlib/functions/gzfile.xml
@@ -10,9 +10,9 @@
   <methodsynopsis>
    <type class="union"><type>array</type><type>false</type></type><methodname>gzfile</methodname>
    <methodparam><type>string</type><parameter>filename</parameter></methodparam>
-   <methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter><initializer>0</initializer></methodparam>
+   <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>&false;</initializer></methodparam>
   </methodsynopsis>
-  <para> 
+  <para>
    This function is identical to <function>readgzfile</function>, except that
    it returns the file in an array.
   </para>
@@ -32,11 +32,9 @@
     <varlistentry>
      <term><parameter>use_include_path</parameter></term>
      <listitem>
-      <para>
-       You can set this optional parameter to <literal>1</literal>, if you
-       want to search for the file in the <link
-       linkend="ini.include-path">include_path</link> too.
-      </para>
+      <simpara>
+       If set to &true;, files in the <link linkend="ini.include-path">include_path</link> are searched for too.
+      </simpara>
      </listitem>
     </varlistentry>
    </variablelist>
@@ -49,6 +47,30 @@
    &return.falseforfailure;.
   </para>
  </refsect1>
+
+ <refsect1 role="changelog">
+  &reftitle.changelog;
+  <informaltable>
+   <tgroup cols="2">
+    <thead>
+     <row>
+      <entry>&Version;</entry>
+      <entry>&Description;</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       <parameter>use_include_path</parameter> is now of type <type>bool</type>.
+       Previously, it was of type <type>int</type>.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
   <para>
@@ -67,6 +89,7 @@ foreach ($lines as $line) {
    </example>
   </para>
  </refsect1>
+
  <refsect1 role="seealso">
   &reftitle.seealso;
   <para>
diff --git a/reference/zlib/functions/gzopen.xml b/reference/zlib/functions/gzopen.xml
index 446c7a9dcd40..f0bdd0c6c464 100644
--- a/reference/zlib/functions/gzopen.xml
+++ b/reference/zlib/functions/gzopen.xml
@@ -11,7 +11,7 @@
    <type class="union"><type>resource</type><type>false</type></type><methodname>gzopen</methodname>
    <methodparam><type>string</type><parameter>filename</parameter></methodparam>
    <methodparam><type>string</type><parameter>mode</parameter></methodparam>
-   <methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter><initializer>0</initializer></methodparam>
+   <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>&false;</initializer></methodparam>
   </methodsynopsis>
   <para>
    Opens a gzip (.gz) file for reading or writing. 
@@ -52,11 +52,9 @@
     <varlistentry>
      <term><parameter>use_include_path</parameter></term>
      <listitem>
-      <para>
-       You can set this optional parameter to <literal>1</literal>, if you
-       want to search for the file in the <link
-       linkend="ini.include-path">include_path</link> too.
-      </para>
+      <simpara>
+       If set to &true;, files in the <link linkend="ini.include-path">include_path</link> are searched for too.
+      </simpara>
      </listitem>
     </varlistentry>
    </variablelist>
@@ -73,6 +71,30 @@
    If the open fails, the function returns &false;.
   </para>
  </refsect1>
+
+ <refsect1 role="changelog">
+  &reftitle.changelog;
+  <informaltable>
+   <tgroup cols="2">
+    <thead>
+     <row>
+      <entry>&Version;</entry>
+      <entry>&Description;</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       <parameter>use_include_path</parameter> is now of type <type>bool</type>.
+       Previously, it was of type <type>int</type>.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
   <para>
diff --git a/reference/zlib/functions/inflate_init.xml b/reference/zlib/functions/inflate_init.xml
index 5fd24c8e109f..ff2bd400101b 100644
--- a/reference/zlib/functions/inflate_init.xml
+++ b/reference/zlib/functions/inflate_init.xml
@@ -11,7 +11,7 @@
   <methodsynopsis>
    <type class="union"><type>InflateContext</type><type>false</type></type><methodname>inflate_init</methodname>
    <methodparam><type>int</type><parameter>encoding</parameter></methodparam>
-   <methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
+   <methodparam choice="opt"><type class="union"><type>array</type><type>object</type></type><parameter>options</parameter><initializer>[]</initializer></methodparam>
   </methodsynopsis>
   <para>
     Initialize an incremental inflate context with the specified
diff --git a/reference/zlib/functions/readgzfile.xml b/reference/zlib/functions/readgzfile.xml
index 180bb26947a0..54380b50a0e6 100644
--- a/reference/zlib/functions/readgzfile.xml
+++ b/reference/zlib/functions/readgzfile.xml
@@ -61,6 +61,29 @@
   &fs.emits.warning.on.failure;
  </refsect1>
 
+ <refsect1 role="changelog">
+  &reftitle.changelog;
+  <informaltable>
+   <tgroup cols="2">
+    <thead>
+     <row>
+      <entry>&Version;</entry>
+      <entry>&Description;</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>8.5.0</entry>
+      <entry>
+       <parameter>use_include_path</parameter> is now of type <type>bool</type>.
+       Previously, it was of type <type>int</type>.
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="seealso">
   &reftitle.seealso;
   <para>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.