3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<_JSON [{ "Rating": "1600", "ID": "16733310", "Name": "LARRATEGUI,MARTIN", "Expires": "1000.10.10" },{ "Rating": "1353", "ID": "16429901", "Name": "ADDABBO,ERIC M", "Expires": "1000.10.10" }] _JSON; $array = json_decode($json, true); $filter = ['ID' => true]; $newArray = array_map(function($item) use ($filter) { return array_diff_key($item, $filter); }, $array); echo json_encode($newArray, JSON_PRETTY_PRINT);

preferences:
177.38 ms | 407 KiB | 5 Q