3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(10, 20); $n = 0 foreach($a as &$v) { echo $v; $a[] = 42; var_dump($a); if $n++ > 3 {break;} }
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /in/Ud940 on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_FOREACH in /in/Ud940 on line 4
Process exited with code 255.