3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ar = array("first name" => array(), "last name" => array()); $ar["first name"][0] = "Ivan"; $ar["last name"][0] = "Ivanov"; $ar["first name"][1] = "Petn"; $ar["last name"][1] = "Petrov"; var_dump($ar);
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
array(2) { ["first name"]=> array(2) { [0]=> string(4) "Ivan" [1]=> string(4) "Petn" } ["last name"]=> array(2) { [0]=> string(6) "Ivanov" [1]=> string(6) "Petrov" } }