3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $person = array( 'name' => 'John', 'age' => 24, 'locations' => Array ( 'Greenwhich' => Array ( 'New Eltham', 'Central Greenwhich' ), 'Feltham' ) ); echo $person['locations']['Greenwhich'][2] = 'Outer Greenwich'; echo print_r($person, true);
based on oi9eH
Output for 4.3.0 - 7.2.0
Outer GreenwichArray ( [name] => John [age] => 24 [locations] => Array ( [Greenwhich] => Array ( [0] => New Eltham [1] => Central Greenwhich [2] => Outer Greenwich ) [0] => Feltham ) )