![]() ![]() | ![]() |
1.1 misho 1: --TEST-- 2: Bug #39990 (Cannot "foreach" over overloaded properties) 3: --FILE-- 4: <?php 5: class Foo { 6: public function __get($name) { 7: return array('Hello', 'World'); 8: } 9: } 10: 11: $obj=new Foo(); 12: foreach($obj->arr as $value) 13: echo "$value\n"; 14: ?> 15: --EXPECT-- 16: Hello 17: World