3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Node { private $next; public function setNext(Node $node = null) { $this->next = $node; return $this; } } class LinkedList { private $head; public function addNode() { $this->head = (new Node())->setNext($this->head); } } $ll = new LinkedList(); for ($i = 0; $i < 3150000; $i++) { $ll->addNode(); } echo "done no probs";
based on rFAfR

Abusive script

This script was stopped while abusing our resources

Output for 7.0.0 - 7.0.3, 7.0.6 - 7.0.7
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4096 bytes) in /in/vr2a8 on line 16
Process exited with code 139.
Output for 7.0.4 - 7.0.5

Process exited with code 137.
Output for 5.5.0 - 5.6.22
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554432 bytes) in /in/vr2a8 on line 16
Process exited with code 139.