Req #48860 [Asn->Tbd]: SplQueue objects can not be stored in session
| From: | colder@php.net | Date: | Tue, 12 Jul 2011 21:45:10 +0000 |
| Subject: | Req #48860 [Asn->Tbd]: SplQueue objects can not be stored in session | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161840@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=48860&edit=1
ID: 48860
Updated by: colder@php.net
Reported by: dave at dtracorp dot com
Summary: SplQueue objects can not be stored in session
-Status: Assigned
+Status: To be documented
Type: Feature/Change Request
Package: SPL related
Operating System: *
PHP Version: 5.3, 6
-Assigned To: colder
+Assigned To:
Block user comment: N
Private report: N
New Comment:
Serialization implemented as of 5.4
Previous Comments:
------------------------------------------------------------------------
[2011-07-12 17:43:14] colder@php.net
Automatic comment from SVN on behalf of colder
Revision: http://svn.php.net/viewvc/?view=revision&revision=313183
Log: Fix #48860 Implement Serialization for DLL
------------------------------------------------------------------------
[2009-08-07 10:29:31] jani@php.net
This is just missing feature. Several other SPL classes also don't implement the Serializable
interface.
------------------------------------------------------------------------
[2009-07-09 00:28:42] dave at dtracorp dot com
Description:
------------
I'm trying to store an SplQueue object in the session, on page reload the SplQueue object is
still there, but it has no data. This happens on Windows XP (Apache 2.0.58), but also on Fedora 8
(apache 2.2), and a Debian build running apache 2.2.
Reproduce code:
---------------
<?php
$q = new SplQueue();
$q->enqueue('something');
$q->enqueue('over there');
session_start();
$_SESSION['q'] = $q;
?>
on the second page
<?php
session_start();
$q = $_SESSION['q'];
print '<pre>';
print_r($q);
Expected result:
----------------
SplQueue Object
(
[flags:SplDoublyLinkedList:private] => 4
[dllist:SplDoublyLinkedList:private] => Array
(
[0] => something
[1] => over there
)
)
Actual result:
--------------
SplQueue Object
(
[flags:SplDoublyLinkedList:private] => 4
[dllist:SplDoublyLinkedList:private] => Array
(
)
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=48860&edit=1