[doc-en] master: Document the missing errors for extract, array_multisort, base_convert and log (#6007)
| From: | qodelicious via GitHub | Date: | Fri, 23 Oct 2026 08:18:38 +0000 |
| Subject: | [doc-en] master: Document the missing errors for extract, array_multisort, base_convert and log (#6007) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23881@lists.php.net to get a copy of this message | ||
Author: qodelicious (qodelicious)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-10-23T10:18:34+02:00
Commit: https://github.com/php/doc-en/commit/3237a040686263e6b95db60c86a29d39b25c298e
Raw diff: https://github.com/php/doc-en/commit/3237a040686263e6b95db60c86a29d39b25c298e.diff
Document the missing errors for extract, array_multisort, base_convert and log (#6007)
Changed paths:
M reference/array/functions/array-multisort.xml
M reference/array/functions/extract.xml
M reference/math/functions/base-convert.xml
M reference/math/functions/log.xml
Diff:
diff --git a/reference/array/functions/array-multisort.xml
b/reference/array/functions/array-multisort.xml
index 769e6629abd4..ee715a28d9aa 100644
--- a/reference/array/functions/array-multisort.xml
+++ b/reference/array/functions/array-multisort.xml
@@ -122,6 +122,18 @@
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if an unknown sort flag is given,
or if the
+ arrays do not all have the same size.
+ </simpara>
+ <simpara>
+ Throws a <exceptionname>TypeError</exceptionname> if an argument is neither an
<type>array</type>
+ nor a sort flag, or if a sort flag of the same kind is given twice for one array.
+ </simpara>
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
@@ -139,6 +151,13 @@
The return type is &true; now; previously, it was <type>bool</type>.
</entry>
</row>
+ <row>
+ <entry>8.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> or
<exceptionname>TypeError</exceptionname> for invalid arguments.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
diff --git a/reference/array/functions/extract.xml b/reference/array/functions/extract.xml
index 36e00bfbb8b9..b35ac272b108 100644
--- a/reference/array/functions/extract.xml
+++ b/reference/array/functions/extract.xml
@@ -165,6 +165,40 @@
table.
</para>
</refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>flags</parameter> is not a valid
+ extract type, if <parameter>prefix</parameter> is not given but
+ <parameter>flags</parameter> needs it, or if
<parameter>prefix</parameter>
+ is not a valid variable name.
+ </simpara>
+ </refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>8.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> for an invalid
<parameter>flags</parameter>
+ or <parameter>prefix</parameter>.
+ Previously, an <constant>E_WARNING</constant> was raised and &null; was
returned.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
diff --git a/reference/math/functions/base-convert.xml b/reference/math/functions/base-convert.xml
index 1689ff61140d..ab7f4cd280f8 100644
--- a/reference/math/functions/base-convert.xml
+++ b/reference/math/functions/base-convert.xml
@@ -74,6 +74,14 @@
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>from_base</parameter> or
+ <parameter>to_base</parameter> is not between <literal>2</literal> and
<literal>36</literal>.
+ </simpara>
+ </refsect1>
+
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
@@ -85,6 +93,14 @@
</row>
</thead>
<tbody>
+ <row>
+ <entry>8.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
<parameter>from_base</parameter> or
+ <parameter>to_base</parameter> is out of range.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
<row>
<entry>7.4.0</entry>
<entry>
diff --git a/reference/math/functions/log.xml b/reference/math/functions/log.xml
index ebf0acf0af31..bfe663b87b23 100644
--- a/reference/math/functions/log.xml
+++ b/reference/math/functions/log.xml
@@ -51,6 +51,39 @@
natural logarithm.
</para>
</refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <simpara>
+ Throws a <exceptionname>ValueError</exceptionname> if
<parameter>base</parameter> is less than
+ or equal to <literal>0</literal>.
+ </simpara>
+ </refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>8.0.0</entry>
+ <entry>
+ Now throws a <exceptionname>ValueError</exceptionname> if
<parameter>base</parameter> is less than
+ or equal to <literal>0</literal>.
+ Previously, an <constant>E_WARNING</constant> was raised and &false; was
returned.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>