svn: /phpdoc/en/trunk/language/oop5/ magic.xml

From: Date: Sun, 10 Jan 2010 13:02:10 +0000
Subject: svn: /phpdoc/en/trunk/language/oop5/ magic.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5804@lists.php.net to get a copy of this message
degeberg Sun, 10 Jan 2010 13:02:10 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=293345 Log: Fixed PHP bug #36172 (subclass serialization of parent private members). Bug: http://bugs.php.net/36172 (Open) subclass serialization of parent private members Changed paths: U phpdoc/en/trunk/language/oop5/magic.xml Modified: phpdoc/en/trunk/language/oop5/magic.xml =================================================================== --- phpdoc/en/trunk/language/oop5/magic.xml 2010-01-10 12:51:22 UTC (rev 293344) +++ phpdoc/en/trunk/language/oop5/magic.xml 2010-01-10 13:02:10 UTC (rev 293345) @@ -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

« previous php.doc.cvs (#5804) next »