Wrong result from PHP's NumberFormatter
I have a strange behavior coming from the intl extension of PHP in Alpine only.
The following code:
$fmt = numfmt_create( ‘de_DE’, NumberFormatter::DECIMAL );
$num = “1.433,95”;
echo numfmt_parse($fmt, $num).“\n”;
should normally output 1433.95. And it does this in other distros I tested, however in my Alpine based docker container I get unexpected results such as 1433.9500000002
Steps to reproduce:
apk add —no-cache php5 php5-cli
Run the following code and you will get a different output than expected ->see https://3v4l.org/MOkc3\#output
Even with PHP7, the problem still persists.
(from redmine: issue id 7108, created on 2017-04-10)