xref: /php-src/Zend/tests/bug78589.phpt (revision 902d6439)
1--TEST--
2Bug #78589: Memory leak with GC + __destruct()
3--FILE--
4<?php
5
6class Test {
7    public $foo;
8    public function __destruct() {}
9}
10
11$test = new Test;
12$test->foo = [&$test->foo];
13$ary = [&$ary, $test];
14unset($ary, $test);
15gc_collect_cycles();
16
17?>
18===DONE===
19--EXPECT--
20===DONE===
21