[doc-en] master: Document setlocale() incompatibility with integer 0 in PHP 8.5 (#5094)

From: Date: Fri, 30 Jan 2026 10:08:28 +0000
Subject: [doc-en] master: Document setlocale() incompatibility with integer 0 in PHP 8.5 (#5094)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23104@lists.php.net to get a copy of this message
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: Girgias Date: 2026-01-30T10:08:26Z Commit: https://github.com/php/doc-en/commit/ec01a42be50e84f192c0b19fc6e9cf40a0f7ac31 Raw diff: https://github.com/php/doc-en/commit/ec01a42be50e84f192c0b19fc6e9cf40a0f7ac31.diff Document setlocale() incompatibility with integer 0 in PHP 8.5 (#5094) Changed paths: M appendices/migration85/incompatible.xml M reference/strings/functions/setlocale.xml Diff: diff --git a/appendices/migration85/incompatible.xml b/appendices/migration85/incompatible.xml index 3300e7eeb046..917b68ac9c88 100644 --- a/appendices/migration85/incompatible.xml +++ b/appendices/migration85/incompatible.xml @@ -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"> diff --git a/reference/strings/functions/setlocale.xml b/reference/strings/functions/setlocale.xml index b3e25d8eb725..77754db2270c 100644 --- a/reference/strings/functions/setlocale.xml +++ b/reference/strings/functions/setlocale.xml @@ -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>

« previous php.doc.cvs (#23104) next »