3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data[0][1] = array('tot_km' => array('0' => 52, "1" => 23)); $data[0][1] = array('tot_km' => Array('0' => 46)); $data[1][1] = array('tot_km' => array('0' => 38, '1' => 22, '2' => 40)); $data[1][2] = array('tot_km' => array('0' => -395, '1' => 28)); print_r($data);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [1] => Array ( [tot_km] => Array ( [0] => 46 ) ) ) [1] => Array ( [1] => Array ( [tot_km] => Array ( [0] => 38 [1] => 22 [2] => 40 ) ) [2] => Array ( [tot_km] => Array ( [0] => -395 [1] => 28 ) ) ) )