|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-06-06 11:08 UTC] jparneodo at yahoo dot fr
class C {
var $bad_1 = 1e-6; // Bug in unserialize
var $bad_2 = 1.0e-6; // Bug in unserialize
var $ok__1 = 1.1e-6;
var $ok__2 = 9e-7;
}
$c=new C();
$s=serialize($c);
$cc=unserialize($s);
/*
Values like 0.00001 (one)
seems to be fatal!
*/
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 21:00:01 2025 UTC |
Test ext/standard/tests/serialize/bug24063.phpt failed Last correct release was 4.3.0 (4.3.1 never tested). All version after 4.3.0 have this bug The new function spprintf was introduced. (to be analysed) foreach(array(0.1,0.01,0.001,0.0001,0.00001,0.000001,0.0000001,0.00000001,0.000000001) as $v){ echo "\n$v: ".serialize($v); } 0.1: d:0.1; 0.01: d:0.01; 0.001: d:0.001; 0.0001: d:0.0001; 1E-05: d:1.0E-5; 1E-06: d::.0E-7; // BUG 1E-07: d::.0E-8; // BUG 1E-08: d:1.0E-8; 1E-09: d:1.0E-9;