3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<'JSON' { "abc": 157, "efg": 1, "hij": "1", "klm": "0.00", "created_at": { "date": "2020-04-08 12:53:34.682759", "timezone_type": 3, "timezone": "UTC" }, "updated_at": { "date": "2020-04-08 12:53:34.682759", "timezone_type": 3, "timezone": "UTC" } } JSON; $arr = json_decode($json, true); function delete_key(&$arr, $key) { foreach($arr as $k => &$v) { if ( $k === $key ) { unset($arr[$k]); continue; } if ( is_array($v) ) { delete_key($v, $key); } } } delete_key($arr, 'date'); print_r(json_encode($arr, JSON_PRETTY_PRINT));
Output for git.master, git.master_jit, rfc.property-hooks
{ "abc": 157, "efg": 1, "hij": "1", "klm": "0.00", "created_at": { "timezone_type": 3, "timezone": "UTC" }, "updated_at": { "timezone_type": 3, "timezone": "UTC" } }

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