3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array( 'key' => 100, 'key2' => 200, 'key3' => 300 ); function getPair($array) { return each($array); } var_dump($array); var_dump($array);
Output for 7.0.0 - 7.0.5
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/XkFM2 on line 4
Process exited with code 255.
Output for 5.5.0 - 5.5.33, 5.6.0 - 5.6.19
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /in/XkFM2 on line 4
Process exited with code 255.

preferences:
186.6 ms | 1395 KiB | 66 Q