Bug #62107 [Opn->Csd]: SplStack serialization problem
Edit report at https://bugs.php.net/bug.php?id=62107&edit=1
ID: 62107
Updated by: levim@php.net
Reported by: ozland2004 at narod dot ru
Summary: SplStack serialization problem
-Status: Open
+Status: Closed
Type: Bug
Package: SPL related
Operating System: CentOS 5.4
PHP Version: 5.3.13
-Assigned To:
+Assigned To: levim
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
Previous Comments:
------------------------------------------------------------------------
[2012-05-23 05:31:46] reeze dot xia at gmail dot com
SplStack makes use of SplDoubleLinkedList. It isn't serializable in PHP5.3
serialize method was introduced in PHP5.4 and 5.4 only:
http://svn.php.net/viewvc?view=revision&revision=313183
http://cn2.php.net/manual/en/spldoublylinkedlist.serialize.php
------------------------------------------------------------------------
[2012-05-22 09:23:50] ozland2004 at narod dot ru
Description:
------------
SplStack object serialization works wrong
Test script:
---------------
$t = new SplStack();
$t->push(1);
var_dump(unserialize(serialize($t)));
Expected result:
----------------
object(SplStack)#32 (2) { ["flags":"SplDoublyLinkedList":private]=> int(6)
["dllist":"SplDoublyLinkedList":private]=> array(1) { [0]=> int(1) } }
Actual result:
--------------
object(SplStack)#31 (2) { ["flags":"SplDoublyLinkedList":private]=> int(6)
["dllist":"SplDoublyLinkedList":private]=> array(0) { } }
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62107&edit=1
Thread (3 messages)