3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function gen() { $gen = yield; #$gen->next(); } $gen = gen(); $gen->send($gen); #$gen->next(); ?>
based on fLJAe
Output for 5.5.24 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.4.45
Notice: Use of undefined constant yield - assumed 'yield' in /in/opiV0 on line 4 Fatal error: Call to a member function send() on a non-object in /in/opiV0 on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Use of undefined constant yield - assumed 'yield' in /in/opiV0 on line 4 Fatal error: Call to a member function on a non-object in /in/opiV0 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant yield - assumed 'yield' in /in/opiV0 on line 4 Fatal error: Call to a member function on a non-object in /in/opiV0 on line 9