note 31189 added to language.variables.scope
| From: | Joachim at rack1 dot php dot net | Date: | Sat, 12 Apr 2003 16:49:28 +0000 |
| Subject: | note 31189 added to language.variables.scope | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46548@lists.php.net to get a copy of this message | ||
The doc here should mention the non-standard scope of member variables in objects here: they are
_not_ within the scope of member functions, so they must be accessed via $this-> )
I really wish this would change; I don't know how many times I've made bugs because of
this, and it makes it a lot less tempting to work in an object-oriented way than it should.
Maybe introduce a different keyword thatn 'var', so it won't conflict with older
code?
--
http://www.php.net/manual/en/language.variables.scope.php
http://master.php.net/manage/user-notes.php?action=edit+31189
http://master.php.net/manage/user-notes.php?action=delete+31189
http://master.php.net/manage/user-notes.php?action=reject+31189