note 46904 added to language.oop5.visibility
| From: | php-general at lists dot php dot net | Date: | Wed, 27 Oct 2004 15:05:19 +0000 |
| Subject: | note 46904 added to language.oop5.visibility | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79187@lists.php.net to get a copy of this message | ||
Notice that visibility has an effect on foreach (iterating an object) and get_object_vars
if you do them externally you'll only get public members, HOWEVER, if you do them INSIDE a
class, on this, or even in a static method on an object, you will have access to ALL MEMBERS the
method would have access to.
In otherwords, if you foreach this you'll get private and protected as well as public.
----
Manual Page -- http://www.php.net/manual/en/language.oop5.visibility.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46904
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46904&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46904&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46904&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46904&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46904&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46904&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46904&report=yes
Search -- http://master.php.net/manage/user-notes.php