mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
47ae4068bb
Patch by Christophe Sollet <csollet@coleebris.com>. (I'll commit a new var_unserializer.c in a second)
25 lines
341 B
PHP
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)
|