3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function fib() { $a = 1; $b = 1; while(true) { $c = $a + $b; $a = $b; $b = $c; if ($c == 7) { throw new RuntimeException('Kaboom!'); } yield $c; } } foreach(fib() as $f) { echo $f . PHP_EOL; }

Abusive script

This script was stopped while abusing our resources