Fixed PHP bug #36172 (subclass serialization of parent private members).

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@293345 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Daniel Egeberg 2010-01-10 13:02:10 +00:00
parent 07f9d0dfcc
commit 3d0b4e7888

View file

@ -41,8 +41,16 @@
and is supposed to return an array with the names of all variables
of that object that should be serialized.
If the method doesn't return anything then &null; is serialized and
E_NOTICE is issued.
<constant>E_NOTICE</constant> is issued.
</para>
<note>
<para>
It is not possible for <literal>__sleep</literal> to return names of
private properties in parent classes. Doing this will result in an
<constant>E_NOTICE</constant> level error. Instead you may use the
<classname>Serializable</classname> interface.
</para>
</note>
<para>
The intended use of <literal>__sleep</literal> is to commit pending
data or perform similar cleanup tasks. Also, the function is