php-src/Zend/tests/bug39990.phpt
Dmitry Stogov e470e22e20 - Fixed bug #35106 (nested foreach fails when array variable has a reference).
- Fixed bug #36214 (__get method works properly only when conditional operator is used).
- Fixed bug #39449 (Overloaded array properties do not work correctly).
- Fixed bug #39990 (Cannot "foreach" over overloaded properties).
2007-01-10 15:58:08 +00:00

18 lines
281 B
PHP
Executable File

--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