3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function genn() { $ar = [214=>22,22=>33,33=>213,213=>1342]; foreach ($ar as $key => $value) { yield $value; } } foreach (genn() as $val) { echo $val. \t; }
based on IYdIf
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Undefined constant 't' in /in/ISKnm:13 Stack trace: #0 {main} thrown in /in/ISKnm on line 13
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Undefined constant 't' in /in/ISKnm on line 13
Process exited with code 255.
Output for 5.4.12 - 5.4.45
Parse error: syntax error, unexpected '$value' (T_VARIABLE) in /in/ISKnm on line 8
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ISKnm on line 5
Process exited with code 255.