php-bignumbers
php-bignumbers copied to clipboard
fromFloat: Ensure dot as decimal point.
String conversion is locale aware, because its primary use case is for display purposes. This hack assumes that the only other decimal point is a comma, which gets replaced by dot.
Alternatively, locale could be set to C before conversion and restored after conversion, although this might incur an performance penalty, because setlocale does I/O.