3v4l.org

run code in 300+ PHP versions simultaneously
<?php $records = [ [ "Id" => 151601, "First_name" => "John", "Positions" => [ "North" => [ "Current_Level" => 4, "Last_Date" => "11/7/2001", "Time" => "4:15 AM" ], "East" => [ "Current_Level" => 4, "Last_Date" => "7/10/2003", "Time" => "7:30 PM" ], "South" => [ "Current_Level" => 2, "Last_Date" => "8/10/2007", "Time" => "NA" ], "West" => [ "Current_Par_Level" => "NA", "Last_Date" => "NA", "Time" => "NA" ], ] ] ]; foreach ($records as $keyRecord => $record) { foreach ($record as $key => $value) { if (is_array($value)) { foreach ($value as $keyPosition => $position) { if ($position["Time"] == "NA") { unset($records[$keyRecord][$key][$keyPosition]); } } } } } print_r($records);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [Id] => 151601 [First_name] => John [Positions] => Array ( [North] => Array ( [Current_Level] => 4 [Last_Date] => 11/7/2001 [Time] => 4:15 AM ) [East] => Array ( [Current_Level] => 4 [Last_Date] => 7/10/2003 [Time] => 7:30 PM ) ) ) )

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:
33.95 ms | 1658 KiB | 4 Q