xref: /PHP-7.4/Zend/tests/bug39990.phpt (revision 782352c5)
1--TEST--
2Bug #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--
16Hello
17World
18