Re: [RFC] [DISCUSSION] Locale-independent float to string cast

From: Date: Tue, 24 Mar 2020 23:14:21 +0000
Subject: Re: [RFC] [DISCUSSION] Locale-independent float to string cast
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-109281@lists.php.net to get a copy of this message
Hi Lynn, > There are automated data exports with prices, that will be automatically consumed on the other side. I agree that these cases can go horribly wrong. However, my reasoning is the following: - if a piece of code currently relies on locale-independence (e.g. automated data exports) then this change wouldn't cause any breakage since a workaround has already been in place there (e.g. the programmers use var_export() instead of casting) - if a piece of code relies on the locale-dependent string representation of floats then there will be a BC break, sure, however I believe that code isn't very sensitive to the change in the vast majority of the cases since that data is for presentation purposes only. Or do you have other locale-dependent use-cases in mind? I am sure there are some but I think the number of the situations where the change is problematic is less than what it first seems. Regards, Máté

« previous php.internals (#109281) next »