summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71067.phpt
blob: b2a1b31811a677163b9c389f9b8754630ed95bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--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
        )

)