3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array(); $arr[1] = array('p' => 3, 'id' => 4); $arr[2] = array('p' => 2, 'id' => 3); $arr[3] = array('p' => 1, 'id' => 2); $arr[4] = array('p' => 0, 'id' => 1); print_r($arr);
Output for 4.3.0 - 7.1.0
Array ( [1] => Array ( [p] => 3 [id] => 4 ) [2] => Array ( [p] => 2 [id] => 3 ) [3] => Array ( [p] => 1 [id] => 2 ) [4] => Array ( [p] => 0 [id] => 1 ) )