1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

Document setlocale() incompatibility with integer 0 in PHP 8.5 (#5094)

This commit is contained in:
Louis-Arnaud
2026-01-30 11:08:26 +01:00
committed by GitHub
parent b41e78e623
commit ec01a42be5
2 changed files with 29 additions and 1 deletions

View File

@@ -442,6 +442,12 @@
if the read_and_close value is not a valid type compatible with int.
</simpara>
<simpara>
Passing an integer <literal>0</literal> as the <parameter>locales</parameter>
argument to <function>setlocale</function> is no longer supported and now throws
a <exceptionname>TypeError</exceptionname>.
</simpara>
</sect2>
<sect2 xml:id="migration85.incompatible.simplexml">

View File

@@ -165,7 +165,29 @@
</para>
</note>
</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>
Passing an integer <literal>0</literal> as the
<parameter>locales</parameter> argument is no longer supported and
now throws a <classname>TypeError</classname>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>