3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = ' { "status": "OK", "response": { "1": { "name": "Personal Information", "fields": { "1": { "name": "About Me", "value": "" }, "4": { "name": "Discord name", "value": "TestAccount#1012" } } } } } '; $j = json_decode($json, TRUE); foreach($j['response'] as $response) { print_r($response['fields']); }
based on Jd5Ra
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0rc3
Array ( [1] => Array ( [name] => About Me [value] => ) [4] => Array ( [name] => Discord name [value] => TestAccount#1012 ) )