php-src/ext/standard/tests/serialize/003.phpt
Sander Roobol 47ae4068bb Made unserialize handle floats with an E notation - bug #18654
Patch by Christophe Sollet <csollet@coleebris.com>.
(I'll commit a new var_unserializer.c in a second)
2002-08-19 19:45:46 +00:00

25 lines
341 B
PHP

--TEST--
unserialize() floats with E notation (#18654)
--POST--
--GET--
--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";
}
?>
--EXPECT--
d:100;
float(100)
d:5.2E+25;
float(5.2E+25)
d:8.529E-22;
float(8.529E-22)
d:9E-09;
float(9.E-9)