php-src/Zend/tests/bug39990.phpt
2018-10-14 12:07:20 -03:00

18 lines
275 B
PHP

--TEST--
Bug #39990 (Cannot "foreach" over overloaded properties)
--FILE--
<?php
class Foo {
public function __get($name) {
return array('Hello', 'World');
}
}
$obj=new Foo();
foreach($obj->arr as $value)
echo "$value\n";
?>
--EXPECT--
Hello
World