1--TEST-- 2Test number_format() - multiple character separator support 3--FILE-- 4<?php 5$values = array(1234.5678, 6 -1234.5678, 7 1234.6578e4, 8 -1234.56789e4, 9 0x1234CDEF, 10 02777777777, 11 "123456789", 12 "123.456789", 13 "12.3456789e1", 14 null, 15 true, 16 false); 17 18echo " number_format tests.....multiple character decimal point\n"; 19for ($i = 0; $i < count($values); $i++) { 20 $res = number_format($values[$i], 2, '·', ' '); 21 var_dump($res); 22} 23 24echo "\n number_format tests.....multiple character thousand separator\n"; 25for ($i = 0; $i < count($values); $i++) { 26 $res = number_format($values[$i], 2, '.' , ' '); 27 var_dump($res); 28} 29 30echo "\n number_format tests.....multiple character decimal and thousep\n"; 31for ($i = 0; $i < count($values); $i++) { 32 $res = number_format($values[$i], 2, '·' , ' '); 33 var_dump($res); 34} 35?> 36--EXPECTF-- 37 number_format tests.....multiple character decimal point 38string(13) "1 234·57" 39string(14) "-1 234·57" 40string(18) "12 346 578·00" 41string(19) "-12 345 678·90" 42string(19) "305 450 479·00" 43string(19) "402 653 183·00" 44string(19) "123 456 789·00" 45string(11) "123·46" 46string(11) "123·46" 47string(9) "0·00" 48string(9) "1·00" 49string(9) "0·00" 50 51 number_format tests.....multiple character thousand separator 52string(15) "1 234.57" 53string(16) "-1 234.57" 54string(27) "12 346 578.00" 55string(28) "-12 345 678.90" 56string(28) "305 450 479.00" 57string(28) "402 653 183.00" 58string(28) "123 456 789.00" 59string(6) "123.46" 60string(6) "123.46" 61string(4) "0.00" 62string(4) "1.00" 63string(4) "0.00" 64 65 number_format tests.....multiple character decimal and thousep 66string(20) "1 234·57" 67string(21) "-1 234·57" 68string(32) "12 346 578·00" 69string(33) "-12 345 678·90" 70string(33) "305 450 479·00" 71string(33) "402 653 183·00" 72string(33) "123 456 789·00" 73string(11) "123·46" 74string(11) "123·46" 75string(9) "0·00" 76string(9) "1·00" 77string(9) "0·00" 78