3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a () { yield 1; yield 2; b() } function b() { yield 'a'; yield 'b'; } foreach(a() as $item) { echo $item,"\n"; }
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected '1' (T_LNUMBER) in m9MWa on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.24, 5.3.26
Parse error: syntax error, unexpected T_LNUMBER in m9MWa on line 3
Process exited with code 255.
Output for 5.3.25
Parse error: syntax error, unexpected T_LNUMBER in /in/m9MWa on line 3
Process exited with code 255.

preferences:
177.32 ms | 1399 KiB | 51 Q