3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = [1, 2, 3, 4, 5, 6] foreach($a as $b) { var_dump($b); } var_dump(current($a));
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /in/YhV6T on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/YhV6T on line 3
Process exited with code 255.