3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { function __construct() { $this->bar = new Bar($this); } } class Bar { function __construct($foo = null) { $this->foo = $foo; } } $i = 1; while ($i > 1000) { $foo = new Foo(); unset($foo); echo number_format(memory_get_usage()) . "\n"; $i++; }
Output for 4.3.0 - 7.1.0