note 86215 added to language.oop.magic-functions
| From: | jcinacioatgmail dot com at osu1 dot php dot net | Date: | Wed, 08 Oct 2008 12:37:46 +0000 |
| Subject: | note 86215 added to language.oop.magic-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145160@lists.php.net to get a copy of this message | ||
For protected properties, use "*" and not the class name:
<?php
// Works:
class SerializeMe {
private $myPrivateProperty;
protected $myProtectedProperty;
public function __sleep () {
return array (
"\0".__CLASS__."\0"."myPrivateProperty",
"\0*\0"."myProtectedProperty"
);
}
}
?>
----
Server IP: 194.8.30.16
Probable Submitter: 89.180.142.34
----
Manual Page -- http://www.php.net/manual/en/language.oop.magic-functions.php
Edit -- https://master.php.net/note/edit/86215
Del: integrated -- https://master.php.net/note/delete/86215/integrated
Del: useless -- https://master.php.net/note/delete/86215/useless
Del: bad code -- https://master.php.net/note/delete/86215/bad+code
Del: spam -- https://master.php.net/note/delete/86215/spam
Del: non-english -- https://master.php.net/note/delete/86215/non-english
Del: in docs -- https://master.php.net/note/delete/86215/in+docs
Del: other reasons-- https://master.php.net/note/delete/86215
Reject -- https://master.php.net/note/reject/86215
Search -- https://master.php.net/manage/user-notes.php