3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array('Buenos Aires' => 'Salto'); $arrCiudades[$a] = 1337; print_r($a); $idCiudad = $arrCiudades['Buenos Aires']['Salto'];
Output for 5.3.0 - 7.2.0
Warning: Illegal offset type in /in/U9QhP on line 3 Array ( [Buenos Aires] => Salto ) Notice: Undefined index: Buenos Aires in /in/U9QhP on line 7
Output for 4.3.0 - 5.2.17
Warning: Illegal offset type in /in/U9QhP on line 3 Array ( [Buenos Aires] => Salto ) Notice: Undefined index: Buenos Aires in /in/U9QhP on line 7