3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a[0]='foo'; $a[1]=11; $a[2]=22; $a[3]=33; $result[current($a)] = array_slice($a, 1); var_dump($result);
Output for 4.3.0 - 7.1.0
array(1) { ["foo"]=> array(3) { [0]=> int(11) [1]=> int(22) [2]=> int(33) } }