3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ [ 'question_category' => 'Engagement', 'result' => '6.6667', 'employee_first_name' => 'Person A', ], [ 'question_category' => 'Tenure', 'result' => '7.6667', 'employee_first_name' => 'Person A', ], [ 'question_category' => 'Engagement', 'result' => '7.6667', 'employee_first_name' => 'Person B', ], [ 'question_category' => 'Tenure', 'result' => '8.3333', 'employee_first_name' => 'Person B', ], ]; $grouped = []; foreach($data as $row){ // I think this is the mapping? If anything else exists, // this will throw $xOrY = match($row['question_category']){ 'Engagement' => 'x', 'Tenure' => 'y', }; // Group by name $grouped[$row['employee_first_name']][$xOrY] = $row['result']; } // Remove the names (optional) $grouped = array_values($grouped); var_dump($grouped);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.120.0120.00920.67
8.4.110.0120.00819.76
8.4.100.0120.00917.63
8.4.90.0130.00720.44
8.4.80.0070.00418.62
8.4.70.0120.00818.75
8.4.60.0130.00818.97
8.4.50.0120.00418.72
8.4.40.0200.00017.47
8.4.30.0140.00420.73
8.4.20.0040.00422.08
8.4.10.0030.00623.87
8.3.250.0110.00918.30
8.3.240.0100.00918.52
8.3.230.0130.00616.57
8.3.220.0100.00918.92
8.3.210.0030.00418.37
8.3.200.0040.00416.60
8.3.190.0100.00817.20
8.3.180.0070.00216.39
8.3.170.0030.01417.34
8.3.160.0040.00420.81
8.3.150.0150.00316.77
8.3.140.0120.00617.09
8.3.130.0090.00016.89
8.3.120.0070.00418.94
8.3.110.0060.00320.94
8.3.100.0050.00324.06
8.3.90.0050.00326.77
8.3.80.0000.00917.97
8.3.70.0140.00016.50
8.3.60.0150.00618.55
8.3.50.0090.01218.43
8.3.40.0150.00322.00
8.3.30.0100.00320.34
8.3.20.0050.00324.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.290.0120.00816.51
8.2.280.0100.00918.56
8.2.270.0090.00917.19
8.2.260.0140.00416.50
8.2.250.0040.01118.18
8.2.240.0070.00316.84
8.2.230.0030.00722.58
8.2.220.0030.00737.54
8.2.210.0000.00726.77
8.2.200.0030.00716.38
8.2.190.0110.00816.58
8.2.180.0100.01016.75
8.2.170.0110.00419.09
8.2.160.0100.01022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0110.00726.16
8.2.110.0080.00422.16
8.2.100.0090.00320.35
8.2.70.0060.00517.52
8.1.330.0130.00616.29
8.1.320.0100.00818.07
8.1.310.0050.00516.28
8.1.300.0100.01016.28
8.1.290.0080.00330.84
8.1.280.0110.00425.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0040.00818.75
8.1.230.0090.00018.61

preferences:
26.46 ms | 403 KiB | 5 Q