note 19077 added to language.oop
| From: | ebypdx at attbi dot com | Date: | Fri, 15 Feb 2002 00:58:19 +0000 |
| Subject: | note 19077 added to language.oop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26628@lists.php.net to get a copy of this message | ||
(only tested w/ php4.1.0 w/ apache 1.3.20)
It appears that you don't have to declare your vars inside a class, even if you want to
serialize an instance of the class. From within any function including the constructor, calling
$this->foo = $bar;
will create an object var in your class, even if there is no class var named foo declared in your
class. If you serialize the object, for example to register it with the client's session or
put it in a database, the object var will remain!
--
http://www.php.net/manual/en/language.oop.php
http://master.php.net/manage/user-notes.php?action=edit+19077
http://master.php.net/manage/user-notes.php?action=delete+19077
http://master.php.net/manage/user-notes.php?action=reject+19077