#44004 [Opn->Csd]: Information on how Objects with non-public properties are serialized is missing
| From: | vrana@php.net | Date: | Fri, 07 Nov 2008 13:21:27 +0000 |
| Subject: | #44004 [Opn->Csd]: Information on how Objects with non-public properties are serialized is missing | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1443@lists.php.net to get a copy of this message | ||
ID: 44004
Updated by: vrana@php.net
Reported By: mfischer@php.net
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
The same rules as in converting to array applies:
"Object's private members have the class name prepended to the member
name; protected members have a '*' prepended to the member name. These
prepended values have null bytes on either side."
Previous Comments:
------------------------------------------------------------------------
[2008-01-31 18:48:36] mfischer@php.net
In the first paragraph, I more precisely meant: "... uses a special
serialization syntax ..."
------------------------------------------------------------------------
[2008-01-31 18:47:17] mfischer@php.net
Description:
------------
The documentation lacks the information that objects with non-public
properties uses a special syntax to associate that information with a
property.
For protected properties, the property name is prefixed with \000, an
asterisk, and \000 again.
For private properties, the property name is prefix with \000, the
follows the class the property is defined in, then \000 again.
It's an important factor to keep in mind when transporting the
serialized format, null-bytes or probably not easily expected in such a
case.
The documentation should probably be reflected on
php.net/manual/en/language.oop.serialization.php. I think it wouldn't
heard if the link to object serialization one php.net/serialize could be
made a bit more prominent.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44004&edit=1