3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh function testY(){ for($i=0;$i<10;$i++) yeld $i; } foreach(testY() as $key) echo "$key\n";
based on nX5if
Output for 5.4.34 - 5.4.35
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/0fHW4 on line 4
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh function testY(){ for($i=0;$i<10;$i++) yeld $i; } foreach(testY() as $key) echo "$key\n";