3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('id' => 'a','b','c','d','e','f','g'); $new_value = $array['id']; unset($array['id']); array_unshift($array, $new_value); var_dump($array);
based on NodX6
Output for 4.3.0 - 7.1.0
array(7) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" [4]=> string(1) "e" [5]=> string(1) "f" [6]=> string(1) "g" }