Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103662 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10088 invoked from network); 2 Jan 2019 13:42:05 -0000 Received: from unknown (HELO mail4.serversure.net) (185.153.204.203) by pb1.pair.com with SMTP; 2 Jan 2019 13:42:05 -0000 Received: (qmail 13415 invoked by uid 89); 2 Jan 2019 10:14:34 -0000 Received: by simscan 1.3.1 ppid: 13398, pid: 13402, t: 4.6406s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@lsces.co.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 2 Jan 2019 10:14:29 -0000 To: internals@lists.php.net References: <94f5feb8-6589-3a0a-2849-7679cec1858c@gmx.de> Message-ID: <193add25-5dd6-c018-c19a-017cb247a468@lsces.co.uk> Date: Wed, 2 Jan 2019 10:14:29 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Inconsistent float to string vs. string to floatcasting From: lester@lsces.co.uk (Lester Caine) 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