php-src/Zend/tests/bug71067.phpt
Nikita Popov 9ed2f4898b Don't disable opcache for generic tests
Even if the original issue only reproduces without opcache, we
should still allow running them with and without opcache.
2020-11-04 11:12:12 +01:00

31 lines
440 B
PHP

--TEST--
Bug #71067 (Local object in class method stays in memory for each call)
--INI--
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
)
)