mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
18 lines
275 B
PHP
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
|