3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __destruct() { } } gc_disable(); $a1 = new A; $a2 = new A; $a1->ref = $a2; $a2->ref = $a1; $a1 = $a2 = NULL; echo 'removed cycles: '.gc_collect_cycles()."\n"; echo 'removed cycles: '.gc_collect_cycles()."\n";

preferences:
52.63 ms | 405 KiB | 5 Q