3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { $f = function () { $a = 1; yield from $a; }; var_dump($f()); } catch(Throwable $e) { var_dump($e); }
Output for 7.0.0 - 7.2.0
object(Generator)#2 (0) { }
Output for 5.5.24 - 5.6.28
Parse error: syntax error, unexpected '$a' (T_VARIABLE) in /in/l7mCG on line 7
Process exited with code 255.
Output for 5.4.11 - 5.4.45
Parse error: syntax error, unexpected 'from' (T_STRING) in /in/l7mCG on line 7
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/l7mCG on line 7
Process exited with code 255.