3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = (array)(json_decode('{"4":"Taaaaa"}')); $key = "4"; var_dump($key, $array, $array[(string)$key]);
based on dig4W
Output for 7.2.0 - 7.3.0alpha1
string(1) "4" array(1) { [4]=> string(6) "Taaaaa" } string(6) "Taaaaa"
Output for 5.6.0 - 7.1.7
Notice: Undefined offset: 4 in /in/h1d3X on line 7 string(1) "4" array(1) { ["4"]=> string(6) "Taaaaa" } NULL