3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"1":1,"5":1}'; $array_val=json_decode($json, true); echo $array_val[1];
Output for 5.6.0 - 5.6.38, 7.0.0 - 7.0.31, 7.1.0 - 7.1.23, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.30, 8.0.0 - 8.0.20, 8.1.0 - 8.1.7
1

preferences:
54.91 ms | 410 KiB | 5 Q