3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', '64K'); class Foo { function __construct() { $this->bar = new Bar($this); } } class Bar { function __construct($foo = null) { $this->foo = $foo; } } while (true) { $foo = new Foo(); unset($foo); echo number_format(memory_get_usage()) . "\\n"; }

preferences:
31.64 ms | 402 KiB | 5 Q