#30323 [Opn->Bgs]: serialize doesn't work on internal classes
| From: | curt@php.net | Date: | Wed, 27 Oct 2004 02:17:03 +0000 |
| Subject: | #30323 [Opn->Bgs]: serialize doesn't work on internal classes | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969364657@lists.php.net to get a copy of this message | ||
ID: 30323
Updated by: curt@php.net
Reported By: matthias dot hoseit at comline dot de
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Windows 2000
PHP Version: 5.0.2
New Comment:
DOMDocument doesn't have any properties thus none are stored in the
searilzed string. unserializing the string creates a DOMDocument object
perfectly fine:
$k = unserialize('O:11:"DOMDocument":0:{}');
var_dump($k);
Previous Comments:
------------------------------------------------------------------------
[2004-10-04 16:58:27] matthias dot hoseit at comline dot de
Description:
------------
The function serialize() doesn't work on internal classes.
For example serializing a DOMDocument object return a byte-stream with
an empty value ("O:11:"DOMDocument":0:{}").
It should be mentioned in the PHP Manual of serialize(), that this
function only work on user defined classes.
Best Regards Matthias hoseit
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30323&edit=1