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, '&#183;', ' ');
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, '.' , '&thinsp;');
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, '&#183;' , '&thinsp;');
32    var_dump($res);
33}
34?>
35--EXPECT--
36number_format tests.....multiple character decimal point
37string(13) "1 234&#183;57"
38string(14) "-1 234&#183;57"
39string(18) "12 346 578&#183;00"
40string(19) "-12 345 678&#183;90"
41string(19) "305 450 479&#183;00"
42string(19) "402 653 183&#183;00"
43string(19) "123 456 789&#183;00"
44string(11) "123&#183;46"
45string(11) "123&#183;46"
46string(9) "1&#183;00"
47string(9) "0&#183;00"
48
49 number_format tests.....multiple character thousand separator
50string(15) "1&thinsp;234.57"
51string(16) "-1&thinsp;234.57"
52string(27) "12&thinsp;346&thinsp;578.00"
53string(28) "-12&thinsp;345&thinsp;678.90"
54string(28) "305&thinsp;450&thinsp;479.00"
55string(28) "402&thinsp;653&thinsp;183.00"
56string(28) "123&thinsp;456&thinsp;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&thinsp;234&#183;57"
64string(21) "-1&thinsp;234&#183;57"
65string(32) "12&thinsp;346&thinsp;578&#183;00"
66string(33) "-12&thinsp;345&thinsp;678&#183;90"
67string(33) "305&thinsp;450&thinsp;479&#183;00"
68string(33) "402&thinsp;653&thinsp;183&#183;00"
69string(33) "123&thinsp;456&thinsp;789&#183;00"
70string(11) "123&#183;46"
71string(11) "123&#183;46"
72string(9) "1&#183;00"
73string(9) "0&#183;00"
74