php-src/Zend/tests/bug39990.phpt
2018-10-14 19:45:12 +02: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