mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
108a2fc64c
The fix breaks two SimpleXML tests those must be fixed
21 lines
455 B
PHP
Executable File
21 lines
455 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";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Notice: Indirect modification of overloaded property foo::$bar has no effect in %sbug38146.php on line 10
|
|
foo => bar
|
|
bar => foo
|