#26247 [Fbk->Bgs]: Problem with serialize function
| From: | iliaa@php.net | Date: | Fri, 14 Nov 2003 15:38:10 +0000 |
| Subject: | #26247 [Fbk->Bgs]: Problem with serialize function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-50396@lists.php.net to get a copy of this message | ||
ID: 26247
Updated by: iliaa@php.net
Reported By: sgarrouste at agencecap dot net
-Status: Feedback
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux Suze
PHP Version: 4.3.3
New Comment:
This is expected behaviour
Previous Comments:
------------------------------------------------------------------------
[2003-11-14 10:37:50] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2003-11-14 04:14:51] sgarrouste at agencecap dot net
Description:
------------
Hello
I have un bug with the function serialize.
I need to serialize object for testing if they not changed.
The bug appear when i serialize type is double but disappear when i
unzerialize.
i explain this in the reproduce code.
i think it's a problem of approximation.
thank for the answer.
ps: my english is not very good, excuse me
Reproduce code:
---------------
<?php
$test = 13.1;
echo "test = ".$test."<br>";
$test2 = serialize($test);
echo "test2(serialize) = ".$test2."<br>";
echo "test2(unserialize) = ".unserialize($test2);
?>
Expected result:
----------------
test = 13.1
test2(serialize) = d:13.1;
test2(unserialize) = 13.1
Actual result:
--------------
test = 13.1
test2(serialize) =
d:13.0999999999999996447286321199499070644378662109375;
test2(unserialize) = 13.1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26247&edit=1