3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.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 hhvm-3.10.0 - 3.12.0
Warning: Invalid operand type was used: Invalid type used as key 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