3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Arr1=[ ["id" => "4123", "test_number" => "1", "sat_total" => "1050"], ["id" => "4123", "test_number" => "2", "sat_total" => "1130"], ["id" => "4123", "test_number" => "3", "sat_total" => "1120"], ["id" => "5555", "test_number" => "1", "sat_total" => "1130"], ["id" => "5555", "test_number" => "2", "sat_total" => "1160"] ]; foreach ($Arr1 as $set) { if (!isset($result[$set['id']])) { $result[$set['id']] = ['id' => $set['id'], 'Score1' => $set['sat_total']]; } else { $result[$set['id']]['Score' . sizeof($result[$set['id']])] = $set['sat_total']; } } var_export(array_values($result));
Output for git.master_jit, git.master, rfc.property-hooks
array ( 0 => array ( 'id' => '4123', 'Score1' => '1050', 'Score2' => '1130', 'Score3' => '1120', ), 1 => array ( 'id' => '5555', 'Score1' => '1130', 'Score2' => '1160', ), )

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:
116.14 ms | 406 KiB | 5 Q