summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71067.phpt
blob: 9528f1fec91d77f9c2bb23916a9608c5d57f9c6c (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
--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
        )

)