3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Obj { public function __construct() { $this->things[] = $this; } public function __destruct() { $this->things[] = null; } private $things = []; } for ($i = 0; $i < 1000000; ++$i) { $obj = new Obj(); }

Abusive script

This script was stopped while abusing our resources

Output for 7.0.0 - 7.0.12
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/lHeRV on line 12
Process exited with code 255.
Output for 5.5.0 - 5.5.3, 5.5.5 - 5.5.7, 5.5.10 - 5.5.12, 5.5.14, 5.5.16 - 5.5.18, 5.5.21 - 5.6.2, 5.6.4 - 5.6.11, 5.6.13 - 5.6.19, 5.6.21 - 5.6.23, 5.6.25 - 5.6.27
Output for 5.5.4, 5.5.8 - 5.5.9, 5.5.13, 5.5.15, 5.5.19 - 5.5.20, 5.6.3, 5.6.12, 5.6.20, 5.6.24

Process exited with code 137.