#23974 [Fbk->NoF]: Floating point data loss in serialize() (and sessions)
| From: | sniper@php.net | Date: | Mon, 09 Jun 2003 13:42:57 +0000 |
| Subject: | #23974 [Fbk->NoF]: Floating point data loss in serialize() (and sessions) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-41523@lists.php.net to get a copy of this message | ||
ID: 23974
Updated by: sniper@php.net
Reported By: ejik at transfer dot kg
-Status: Feedback
+Status: No Feedback
Bug Type: Scripting Engine problem
Operating System: any
PHP Version: 4.3.2
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-06-03 04:31:19] derick@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-06-03 03:27:45] ejik at transfer dot kg
Bug #23298 Floating point data loss in serialize() (and sessions)
This bug seems to be not fixed!
Script:
<?php
ini_set("precision", 32);
$var = 1.4285714285714286476;
var_dump($var);
$foo = serialize($var);
echo ' ', $foo, "\n";
$x = unserialize($foo);
var_dump($x);
var_dump($x === $var);
ini_set("precision", 12);
$var = 1.4285714285714286476;
var_dump($var);
$foo = serialize($var);
echo ' ', $foo, "\n";
$x = unserialize($foo);
var_dump($x);
var_dump($x === $var);
?>
output:
float(000ý)
d:000ý;
bool(false)
bool(false)
float(000ý)
d:000ý; n
bool(false)
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23974&edit=1