summaryrefslogtreecommitdiff
path: root/tests/lang/bug24640.phpt
blob: 919b38e29e44aa2272406bda18ba3ab0ad1c9444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
--TEST--
Bug #24640 (var_export and var_dump can't output large float)
--INI--
precision=12
--FILE--
<?php
function test($v)
{
	echo var_export($v, true) . "\n";
	var_dump($v);
	echo "$v\n";
	print_r($v);
	echo "\n------\n";
}

test(1.7e+300);
test(1.7e-300);
test(1.7e+79);
test(1.7e-79);
test(1.7e+80);
test(1.7e-80);
test(1.7e+81);
test(1.7e-81);
test(1.7e+319);
test(1.7e-319);
test(1.7e+320);
test(1.7e-320);
test(1.7e+321);
test(1.7e-321);
test(1.7e+324);
test(1.7e-324);
test(1.7e+1000);
test(1.7e-1000);

?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
1.7E+300
float(1.7E+300)
1.7E+300
1.7E+300
------
1.7E-300
float(1.7E-300)
1.7E-300
1.7E-300
------
1.7E+79
float(1.7E+79)
1.7E+79
1.7E+79
------
1.7E-79
float(1.7E-79)
1.7E-79
1.7E-79
------
1.7E+80
float(1.7E+80)
1.7E+80
1.7E+80
------
1.7E-80
float(1.7E-80)
1.7E-80
1.7E-80
------
1.7E+81
float(1.7E+81)
1.7E+81
1.7E+81
------
1.7E-81
float(1.7E-81)
1.7E-81
1.7E-81
------
I%s
float(I%s)
I%s
I%s
------
1.69998107421E-319
float(1.69998107421E-319)
1.69998107421E-319
1.69998107421E-319
------
I%s
float(I%s)
I%s
I%s
------
1.70007988734E-320
float(1.70007988734E-320)
1.70007988734E-320
1.70007988734E-320
------
I%s
float(I%s)
I%s
I%s
------
1.69958582169E-321
float(1.69958582169E-321)
1.69958582169E-321
1.69958582169E-321
------
I%s
float(I%s)
I%s
I%s
------
0
float(0)
0
0
------
I%s
float(I%s)
I%s
I%s
------
0
float(0)
0
0
------
===DONE===