3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { public $r; public $r2; public function __destruct() { $this->r2 = null; } } function getCircle() { $a = new X(); $b = new X(); $c = new X(); $a->r = $c; $b->r = $a; $c->r = $b; return $a; } $zeroMemory = memory_get_usage(); $u = getCircle(); $u->r2 = getCircle(); $u = null; gc_collect_cycles(); var_dump(memory_get_usage()- $zeroMemory);
Output for git.master, git.master_jit
int(0)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.48 ms | 401 KiB | 7 Q