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