ID: 48860 Updated by: j...@php.net -Summary: Data in SplQueue objects is not persistent Reported By: dave at dtracorp dot com Status: Open Bug Type: SPL related -Operating System: windows xp +Operating System: * -PHP Version: 5.3.0 +PHP Version: 5.3, 6 New Comment:
This is just missing feature. Several other SPL classes also don't implement the Serializable interface. Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/?id=48860&edit=1