3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = [ 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3', 'key4' => 'value4', 'key5' => 'value5' ]; (function test($val) { echo $val; })('lol'); //foreach ($array as $arr) { //if
Output for 5.4.0 - 5.4.21
Parse error: syntax error, unexpected 'test' (T_STRING), expecting '(' in /in/UGX4O on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[' in /in/UGX4O on line 5
Process exited with code 255.