mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +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).
20 lines
348 B
PHP
Executable File
20 lines
348 B
PHP
Executable File
--TEST--
|
|
Bug #38146 (Cannot use array returned from foo::__get('bar') in write context)
|
|
--FILE--
|
|
<?php
|
|
class foo {
|
|
public function __get($member) {
|
|
$f = array("foo"=>"bar","bar"=>"foo");
|
|
return $f;
|
|
}
|
|
}
|
|
|
|
$f = new foo();
|
|
foreach($f->bar as $key => $value) {
|
|
print "$key => $value\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
foo => bar
|
|
bar => foo
|