From 3d0b4e78888cbb258cc03194749acea2cefd3758 Mon Sep 17 00:00:00 2001 From: Daniel Egeberg Date: Sun, 10 Jan 2010 13:02:10 +0000 Subject: [PATCH] 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 --- language/oop5/magic.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/language/oop5/magic.xml b/language/oop5/magic.xml index 626a4e0057..b806632e7b 100644 --- a/language/oop5/magic.xml +++ b/language/oop5/magic.xml @@ -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. + E_NOTICE is issued. + + + It is not possible for __sleep to return names of + private properties in parent classes. Doing this will result in an + E_NOTICE level error. Instead you may use the + Serializable interface. + + The intended use of __sleep is to commit pending data or perform similar cleanup tasks. Also, the function is