3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '[ { "id": 1, "content": "Reason 1" }, { "id": 2, "content": "Reason 2" }, { "id": 3, "content": "Reason 3" }, { "id": 4, "content": "Reason 4" } ]'; $from = json_decode($content, true); $to = json_encode(array_column($from, 'content', 'id'), JSON_PRETTY_PRINT); echo $to;
Output for git.master, git.master_jit, rfc.property-hooks
{ "1": "Reason 1", "2": "Reason 2", "3": "Reason 3", "4": "Reason 4" }

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:
76.35 ms | 405 KiB | 5 Q