3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('a' => 2, 'b' => 1, 'c' => 4); $first = array(key($array) => current($array)); end($array); array_pop(array_shift($array)) $array = array_merge(array(key($array) => current($array)), $array, $first); print_r($array);
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '$array' (T_VARIABLE) in /in/1VvhE on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/1VvhE on line 7
Process exited with code 255.