1--TEST--
2double to string conversion tests (64bit)
3--SKIPIF--
4<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
5--INI--
6precision=14
7--FILE--
8<?php
9
10$doubles = array(
11        29000000000000000000000000000000000000,
12        290000000000000000,
13        290000000000000,
14        29000000000000,
15        29000000000000.123123,
16        29000000000000.7123123,
17        29000.7123123,
18        239234242.7123123,
19        0.12345678901234567890,
20        10000000000000000000000000000000000000000000000,
21        1000000000000000000000000000000000,
22        100000000000000001,
23        1000006000000000011,
24        100000000000001,
25        10000000000,
26        999999999999999999,
27        9999999999999999999,
28        9999999999999999999999999999999999999,
29        (float)0
30        );
31
32foreach ($doubles as $d) {
33        var_dump((string)$d);
34}
35
36echo "Done\n";
37?>
38--EXPECT--
39string(7) "2.9E+37"
40string(18) "290000000000000000"
41string(15) "290000000000000"
42string(14) "29000000000000"
43string(14) "29000000000000"
44string(14) "29000000000001"
45string(13) "29000.7123123"
46string(15) "239234242.71231"
47string(16) "0.12345678901235"
48string(7) "1.0E+46"
49string(7) "1.0E+33"
50string(18) "100000000000000001"
51string(19) "1000006000000000011"
52string(15) "100000000000001"
53string(11) "10000000000"
54string(18) "999999999999999999"
55string(7) "1.0E+19"
56string(7) "1.0E+37"
57string(1) "0"
58Done
59