Download src/php/php-src/ext/intl/tests/bug14562.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/intl/tests/bug14562.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/intl/tests/bug14562.phpt
-
curl -L -o bug14562.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/intl/tests/bug14562.phpt
624 Bytes
| --TEST-- | |
| Bug #14562 NumberFormatter breaks when locale changes | |
| --EXTENSIONS-- | |
| intl | |
| --FILE-- | |
| function ut_main() | |
| { | |
| $res_str = ""; | |
| $de_locale="de_DE.UTF-8"; | |
| $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL ); | |
| $numeric = $fmt->parse("1234,56"); | |
| $res_str .= "$numeric\n"; | |
| setlocale(LC_ALL, $de_locale); | |
| $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL ); | |
| $numeric = $fmt->parse("1234,56"); | |
| setlocale(LC_ALL, "C"); // reset for printing | |
| $res_str .= "$numeric\n"; | |
| return $res_str; | |
| } | |
| include_once( 'ut_common.inc' ); | |
| ut_run(); | |
| --EXPECT-- | |
| 1234.56 | |
| 1234.56 | |