3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"myint": 1, "mystring" : "mystring", "myintwithquotes":"2"}'; $array = json_decode($json,true); foreach($array AS $key => $value) { echo $key . ": " . gettype($value) . "\n"; }

preferences:
42.81 ms | 402 KiB | 5 Q