ID: 51089 Updated by: paj...@php.net Reported By: phpnet4b7e640208df0 at mon-mail dot org -Status: Open +Status: Feedback Bug Type: Math related Operating System: Windows Server 2003 R2 Standard PHP Version: 5.3.1 New Comment:
I can't reproduce it (with 5.3.1 or 5.3.2RC2). Can you try again with 5.3.2RC2? (http://windows.php.net/qa/) Previous Comments: ------------------------------------------------------------------------ [2010-02-19 10:26:13] phpnet4b7e640208df0 at mon-mail dot org Description: ------------ Unserialisation of serialised arrays containing large numbers fails and unserialize returns FALSE. The issue appears to be in serialized() since unserialising an array serialised by an older version of PHP works as expected (as shown in reproduce code). No error is reported (as expected with unserialize()) and no crash. Reproduce code: --------------- <? $anArray = Array(); $anArray["anumber"]=212133254400; $anArray["anothernumber"]=212164790400; print("Serialised: "); print(serialize($anArray)); print("\n"); print("Unserialised: "); print_r(unserialize(serialize($anArray))); print("\n"); print("Error: "); print(unserialize(serialize($anArray))===FALSE?"yes":"no"); print("\n"); print("Old style: "); print_r(unserialize("a:2:{s:7:\"anumber\";d:212133254400;s:13:\"anothernumber\";d:212164790400;}")); print("\n"); ?> Expected result: ---------------- Serialised: a:2:{s:7:"anumber";d:212133254400;s:13:"anothernumber";d:212164790400;} Unserialised:Array ( [anumber] => 212133254400 [anothernumber] => 212164790400 ) Error: no Old style: Array ( [anumber] => 212133254400 [anothernumber] => 212164790400 ) Actual result: -------------- Serialised: a:2:{s:7:"anumber";d:2121332543:0;s:13:"anothernumber";d:2121647903:0;} Unserialised: Error: yes Old style: Array ( [anumber] => 212133254400 [anothernumber] => 212164790400 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51089&edit=1