1--TEST-- 2Bug #53735 NumberFormatter returns NaN when converting float point 3--SKIPIF-- 4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> 5<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?> 6--FILE-- 7<?php 8 9$fmt = numfmt_create("da_DK", \NumberFormatter::CURRENCY); 10 11var_dump(numfmt_format($fmt, 5.5)); 12setlocale(LC_ALL, "da_DK.UTF-8"); 13 14var_dump(numfmt_format($fmt, 5.5)); 15 16 17$fmt = new \NumberFormatter("de_DE", \NumberFormatter::DECIMAL); 18var_dump($fmt->format(23.25)); 19 20$f = new NumberFormatter('hu_HU', NumberFormatter::PERCENT, '#,##0%'); 21var_dump($f->format(0.26)); 22 23?> 24--EXPECTF-- 25string(%d) "5,50 kr%A" 26string(%d) "5,50 kr%A" 27string(5) "23,25" 28string(3) "26%" 29