3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = (array) json_decode('{"1":"1","2":"1","3":"1","4":"1","12":"12"}'); var_dump($array); var_dump(array_key_exists("12", $array));
based on pXlRu
Output for 7.2.0 - 7.3.0alpha1
array(5) { [1]=> string(1) "1" [2]=> string(1) "1" [3]=> string(1) "1" [4]=> string(1) "1" [12]=> string(2) "12" } bool(true)
Output for 5.6.0 - 7.1.7
array(5) { ["1"]=> string(1) "1" ["2"]=> string(1) "1" ["3"]=> string(1) "1" ["4"]=> string(1) "1" ["12"]=> string(2) "12" } bool(false)