bug78589.phpt 271 B

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