note 46906 deleted from language.oop5.iterations by nlopess
| From: | nlopess@php.net | Date: | Thu, 04 Nov 2004 19:58:48 +0000 |
| Subject: | note 46906 deleted from language.oop5.iterations by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79638@lists.php.net to get a copy of this message | ||
Note Submitter:
----
By default, all public properties will be used for the iteration is incorrect.
By default, all properties the function/method has ACCESS TO will be used for iteration. What does
this mean? It means that if you foreach($this) inside a class you will get private, protected, and
public properties. And since there's no way to tell if a property is public or private in php5
without using reflection, well, it's a pain.