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