3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function get_gen() { echo "Starting generator\n"; $a = yield 0; echo $a . "\n"; } $gen = get_gen(); $gen->send(2);
based on pRDr9
Output for 7.0.0 - 7.2.0
Starting generator 2
Output for 5.4.10 - 5.6.28
Parse error: syntax error, unexpected '0' (T_LNUMBER) in /in/FosQt on line 5
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_LNUMBER in /in/FosQt on line 5
Process exited with code 255.