Edit report at https://bugs.php.net/bug.php?id=48860&edit=1

 ID:                 48860
 Updated by:         col...@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] col...@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] j...@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

Reply via email to