summaryrefslogtreecommitdiff
path: root/ext/standard/tests/serialize/003.phpt
blob: 501141280986751e70d9068976c2662735624e71 (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
--TEST--
unserialize() floats with E notation (#18654)
--INI--
precision=12
serialize_precision=100
--FILE--
<?php
foreach(array(1e2, 5.2e25, 85.29e-23, 9e-9) AS $value) {
	echo ($ser = serialize($value))."\n";
	var_dump(unserialize($ser));
	echo "\n";
}
?>
--EXPECTREGEX--
d:100;
float\(100\)

d:5[0-9]*;
float\(5\.2E\+25\)

d:8\.52[89][0-9]+E-22;
float\(8\.529E-22\)

d:8\.[9]*[0-9]*E-9;
float\(9\.0E-9\)