3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function generator() { $a = 0; $b = 1; yield $b; while(true) { $c = $a+$b; $a = $b; $b = $c; yield $c; } } foreach(generator() as $value) { echo $value, ' '; }