note 38930 added to ref.classobj
| From: | heleon at ergens dot php dot net | Date: | Mon, 12 Jan 2004 19:11:49 +0000 |
| Subject: | note 38930 added to ref.classobj | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63360@lists.php.net to get a copy of this message | ||
Hi,
Take care with setting properties outside a class. I thought I had extended a var named Name en used
it outside its class. After some searching I found that it was not the extended Name that was set
but a new generated one. Created when setting it. With normal variables I don't find undeclared
vars a problem. But with classes it could get messy I think.
$this->Characters[$this->CharacterID]->Name = "Hank";
Heleon
----
Manual Page -- http://www.php.net/manual/en/ref.classobj.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38930
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38930&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38930&report=yes
Search -- http://master.php.net/manage/user-notes.php