On 01/01/2019 23:29, Stanislav Malyshev wrote:
Finally, I don't think that the global locale is the real problem for PHP. Rather it's PHP locale handling and the fact that setlocale() works per process (and not per thread). When PHP starts up, no locale
That's part of locale being global. Though even in environment where threads are not involved, many apps do not account for locale quirks.
Like many things that originated in the 'Personal' age of PHP, the 'Server' nature is somewhat inconsistent in many areas. Working with 'time' while some people still insist on using LOCAL time on their servers, the more consistent method is to use UTC and then identify the CLIENTS preferred locale. Displaying other numbers have exactly the same problem and it should be a client locale setting that decides how to display them, with a global base of something ASCII based. Making validation client specific removes the need to mess up the server by trying to run multiple locales with the possible conflicts between that, just as trying to manage multiple times is complicated if the server is running yet another locale?
-- Lester Caine - G8HFL ----------------------------- Contact - https://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - https://lsces.co.uk EnquirySolve - https://enquirysolve.com/ Model Engineers Digital Workshop - https://medw.co.uk Rainbow Digital Media - https://rainbowdigitalmedia.co.uk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php