3v4l.org

run code in 300+ PHP versions simultaneously
<?php $response ='[ { "userSummaries": [ { "id": "9910", "status": "Active", "name": "Jhon" } ] }, { "userSummaries": [ { "id": "8754", "status": "Active", "name": "Jane" } ] } ]'; $myArr = json_decode($response, true); $result_arr = []; array_walk($myArr,function($v,$k) use (&$result_arr){ $result_arr[key($v)] = $v[key($v)]; }); echo json_encode($result_arr);
Output for git.master, git.master_jit, rfc.property-hooks
{"userSummaries":[{"id":"8754","status":"Active","name":"Jane"}]}

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
25.67 ms | 405 KiB | 5 Q