Download src/php/php-src/ext/intl/tests/bug53735.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 575 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/intl/tests/bug53735.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/intl/tests/bug53735.phpt
-
curl -L -o bug53735.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/intl/tests/bug53735.phpt
575 Bytes
| --TEST-- | |
| Bug #53735 NumberFormatter returns NaN when converting float point | |
| --EXTENSIONS-- | |
| intl | |
| --FILE-- | |
| $fmt = numfmt_create("da_DK", \NumberFormatter::CURRENCY); | |
| var_dump(numfmt_format($fmt, 5.5)); | |
| setlocale(LC_ALL, "da_DK.UTF-8"); | |
| var_dump(numfmt_format($fmt, 5.5)); | |
| $fmt = new \NumberFormatter("de_DE", \NumberFormatter::DECIMAL); | |
| var_dump($fmt->format(23.25)); | |
| $f = new NumberFormatter('hu_HU', NumberFormatter::PERCENT, '#,##0%'); | |
| var_dump($f->format(0.26)); | |
| --EXPECTF-- | |
| string(%d) "5,50 kr%A" | |
| string(%d) "5,50 kr%A" | |
| string(5) "23,25" | |
| string(3) "26%" | |