ID: 48860 Updated by: col...@php.net Reported By: dave at dtracorp dot com -Status: Open +Status: Assigned Bug Type: SPL related Operating System: * PHP Version: 5.3, 6 -Assigned To: +Assigned To: colder
Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/?id=48860&edit=1