mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
e470e22e20
- 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).
18 lines
281 B
PHP
Executable File
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
|