mirror of
https://github.com/php/php-src.git
synced 2024-09-25 03:47:26 +00:00
32 lines
418 B
Plaintext
32 lines
418 B
Plaintext
|
--TEST--
|
||
|
Bug #71067 (Local object in class method stays in memory for each call)
|
||
|
--INI--
|
||
|
opcache.enable=0
|
||
|
error_reporting=0
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class Test {
|
||
|
public function test(){
|
||
|
$arr = (object) [
|
||
|
'children' => []
|
||
|
];
|
||
|
$arr->children[] = 1;
|
||
|
return $arr;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$o = new Test();
|
||
|
$o->test();
|
||
|
|
||
|
print_r($o->test());
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
stdClass Object
|
||
|
(
|
||
|
[children] => Array
|
||
|
(
|
||
|
[0] => 1
|
||
|
)
|
||
|
|
||
|
)
|