3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (phpversion() < 50500) exit; function test () { while ($data = yield) echo $data; } $d = test(); $d->send('something'); $d->send('something2');
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
Output for hhvm-3.12.0 - 3.13.2
Fatal error: Uncaught Error: syntax error, unexpected T_YIELD in /in/M4KAr:5 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: syntax error, unexpected T_YIELD in /in/M4KAr on line 5
Process exited with code 255.