3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php Class hej { function getArray() { return [1, 2, 3]; } } $hej = new hej(); $array = $hej->getArray(); forEach($arr in $array) { print $arr; } // your code goes here
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'in' (T_STRING) in /in/ouQG9 on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/ouQG9 on line 5
Process exited with code 255.