mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
07f9d0dfcc
commit
3d0b4e7888
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue