3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"int": 1, "string" : "mystring"}'; $array = json_decode($json,true); foreach($array AS $value) { echo gettype($value); }

preferences:
26.19 ms | 402 KiB | 5 Q