3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php function test(array $array) { foreach ($array as $value) { yield $value; } } $array = range(0, 10000); $values = array(); foreach (test($array) as $value) { $values[] = $value; }
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19, 5.5.0 - 5.5.3
Parse error: syntax error, unexpected '<' in /in/drgfg on line 3
Process exited with code 255.

preferences:
187.63 ms | 1395 KiB | 59 Q