php-src/Zend/tests/bug39990.phpt
2012-10-10 10:27:49 +08:00

18 lines
281 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