Hi,
Máté Kocsis wrote:
Hi Internals,
Together with George, I'd like to propose an RFC for a long-standing
problem PHP has:
casting floats to string depends on the locale settings. As this behaviour
is nonsense, and
because it can cause quite serious problems, we would like to get rid of
locale-dependence
in PHP 8.
Please find our RFC at
https://wiki.php.net/rfc/locale_independent_float_to_string.
Regards,
George and Máté
Just a little thing, saying “certain locales (notably the German,
French, and Spanish ones)” perhaps understates the issue. Most
non-English-speaking countries do not use . as the decimal separator!
https://en.wikipedia.org/wiki/Decimal_separator#Arabic_numerals
Anyway, thank you for this RFC, I think fixing this is long, long
overdue. I expect there could be a serious BC impact for certain PHP
users, but I don't think there is a good long-term solution for this
short of forcing such code to be updated.
As a potential improvement, I would suggest to try to be closer to
comprehensive in documenting which functions' behaviour changes or does
not. For example, this RFC doesn't currently say what happens to
settype() and print_r().
Thanks,
Andrea
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php