note 43981 deleted from ref.overload by nlopess
| From: | nlopess@php.net | Date: | Sun, 11 Jul 2004 15:10:59 +0000 |
| Subject: | note 43981 deleted from ref.overload by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73053@lists.php.net to get a copy of this message | ||
Note Submitter: jobe
----
josh said:
>One thing about __get is that if you return an array it
>doesn't work directly within a foreach...
In PHP 5, however, you can use directly an array returned by __get if you enclose the expression in
parentheses:
foreach(($a->test) as $value) ...