RE: [PHP-DEV] Change `se tlocale()` to use the `u selocale()` C function if available on POSIX too

From: Date: Wed, 29 Oct 2025 16:58:14 +0000
Subject: RE: [PHP-DEV] Change `se tlocale()` to use the `u selocale()` C function if available on POSIX too
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-129001@lists.php.net to get a copy of this message
On 29 October 2025 15:56:21 GMT, Marc Henderkes <m@pyc.ac> wrote: >I assume it’s not a bug because it’s the documented in the manual at >https://www.php.net/manual/en/function.setlocale.php Perhaps "known limitation" is a better term than "bug". I don't think anyone considers this a *feature*, or would deliberately make use of it; the general advice is just "don't use it in multi-threaded contexts". This was one of the main reasons given for deprecating strftime() in PHP 8.1 - because it was not thread safe, users should be encouraged to use something else. <https://wiki.php.net/rfc/deprecations_php_8_1#strftime_and_gmstrftime> Removing that limitation is not likely to be controversial, in principle. What is probably needed is detailed *technical* discussion of the proposed approach, so a Pull Request is probably more relevant than an RFC. [PS: policy on this list is to edit quoted text and place your reply below, as I've done here, rather than above as many email clients do by default] Rowan Tommins [IMSoP]

« previous php.internals (#129001) next »