1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/Zend/tests/bug71067.phpt
2020-02-03 22:52:20 +01:00

32 lines
457 B
PHP

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