3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[{"REG":"SK", "RES":"PAN1", "WELL":"P1-TG", "TIME":"2005-03-27"}, {"REG":"SK", "RES":"PAN1", "WELL":"P1-TG", "TIME":"2005-04-13"}, {"REG":"SK", "RES":"PAN1", "WELL":"P1-TG", "TIME":"2006-06-07"}, {"REG":"SK", "RES":"PAN2", "WELL":"P2-TG", "TIME":"2009-01-18"}, {"REG":"SK", "RES":"PAN3", "WELL":"P3-TG", "TIME":"2009-03-01"}, {"REG":"SK", "RES":"PAN3", "WELL":"P3-TG", "TIME":"2010-03-14"}]'; foreach (json_decode($json, true) as $row) { $composite_key = implode('-', array_slice($row, 0, 3)); if (!isset($result[$composite_key])) { $row['TIME'] = [$row['TIME']]; $result[$composite_key] = $row; } else { $result[$composite_key]['TIME'][] = $row['TIME']; } } echo json_encode(array_values($result), JSON_PRETTY_PRINT);

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.3.60.0070.00718.43
8.3.50.0070.00718.07
8.3.40.0040.01118.89
8.3.30.0110.00318.59
8.3.20.0080.00019.29
8.3.10.0000.00821.89
8.3.00.0070.00020.64
8.2.180.0070.01118.29
8.2.170.0070.01422.96
8.2.160.0040.01122.07
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00820.88
8.2.110.0030.00719.39
8.2.100.0070.00418.09
8.2.90.0080.00017.63
8.2.80.0040.00417.97
8.2.70.0000.00818.05
8.2.60.0040.00418.16
8.2.50.0000.01018.10
8.2.40.0000.00819.47
8.2.30.0050.00319.35
8.2.20.0000.00718.14
8.2.10.0070.00018.08
8.2.00.0040.00417.81
8.1.280.0000.01425.92
8.1.270.0040.00418.83
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0090.00019.09
8.1.230.0110.00019.10
8.1.220.0030.00517.75
8.1.210.0080.00018.77
8.1.200.0060.00617.35
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0040.00418.48
8.1.160.0080.00018.92
8.1.150.0090.00018.90
8.1.140.0000.00722.18
8.1.130.0030.00320.29
8.1.120.0000.00717.47
8.1.110.0070.00017.36
8.1.100.0040.00417.51
8.1.90.0040.00417.46
8.1.80.0040.00417.54
8.1.70.0000.00717.53
8.1.60.0040.00817.45
8.1.50.0040.00417.52
8.1.40.0110.00017.39
8.1.30.0000.00917.66
8.1.20.0000.00717.61
8.1.10.0090.00017.57
8.1.00.0000.00817.52
8.0.300.0050.00318.77
8.0.290.0030.00616.75
8.0.280.0000.00818.47
8.0.270.0000.00717.19
8.0.260.0000.00618.47
8.0.250.0000.00617.02
8.0.240.0030.00316.95
8.0.230.0000.00716.99
8.0.220.0050.00516.94
8.0.210.0000.00716.91
8.0.200.0040.00416.98
8.0.190.0040.00417.00
8.0.180.0040.00416.92
8.0.170.0060.00317.00
8.0.160.0060.00316.90
8.0.150.0040.00416.79
8.0.140.0040.00316.88
8.0.130.0030.00313.36
8.0.120.0040.00416.89
8.0.110.0060.00316.83
8.0.100.0070.00016.96
8.0.90.0030.00616.82
8.0.80.0030.01116.84
8.0.70.0080.00016.78
8.0.60.0000.00816.98
8.0.50.0040.00416.79
8.0.30.0080.01017.21
8.0.20.0100.01217.40
8.0.10.0050.00216.84
8.0.00.0110.00916.79
7.4.330.0000.00415.55
7.4.320.0000.00616.45
7.4.300.0000.00616.63
7.4.290.0000.00816.61
7.4.280.0030.00716.61
7.4.270.0000.00816.54
7.4.260.0000.00716.50
7.4.250.0030.00316.52
7.4.240.0000.00716.54
7.4.230.0030.00316.67
7.4.220.0040.00416.73
7.4.210.0110.00916.69
7.4.200.0040.00416.70
7.4.160.0110.00616.61
7.4.140.0120.01017.86
7.4.130.0100.00716.55
7.4.120.0110.00716.53
7.4.110.0050.00916.50
7.4.100.0040.01316.50
7.4.90.0060.01216.56
7.4.80.0040.01719.39
7.4.70.0090.01016.51
7.4.60.0070.01016.53
7.4.50.0060.00616.61
7.4.40.0070.01116.41
7.4.00.0030.00915.12
7.3.330.0050.00213.19
7.3.320.0050.00013.25
7.3.310.0030.00616.40
7.3.300.0000.00716.38
7.3.290.0000.00716.19
7.3.280.0100.00716.39
7.3.260.0090.00916.51
7.3.240.0110.00916.49
7.3.230.0040.01316.57
7.3.210.0200.00016.49
7.3.200.0030.01816.72
7.3.190.0060.01016.60
7.3.180.0000.01816.19
7.3.170.0100.01016.36
7.3.160.0100.00716.59
7.3.10.0030.01016.82
7.3.00.0040.01216.58
7.2.330.0090.00916.73
7.2.320.0090.00916.79
7.2.310.0150.00616.40
7.2.300.0030.01216.84
7.2.290.0130.00316.53
7.2.130.0040.01117.14
7.2.120.0080.00416.85
7.2.110.0060.00616.76
7.2.100.0060.00616.79
7.2.90.0030.01216.71
7.2.80.0080.00616.84
7.2.70.0040.01017.02
7.2.60.0060.00816.89
7.2.50.0050.00916.87
7.2.40.0080.00717.02
7.2.30.0080.00316.91
7.2.20.0070.00616.92
7.2.10.0070.00517.00
7.2.00.0050.01016.78
7.1.250.0000.01115.77
7.1.230.0090.00415.65
7.1.220.0080.00415.67
7.1.210.0040.01115.67
7.1.200.0030.01015.77
7.1.190.0040.01115.41
7.1.180.0080.00415.38
7.1.170.0110.00315.77
7.1.160.0090.00315.70
7.1.150.0100.00715.81
7.1.140.0000.01115.88
7.1.130.0040.00815.60
7.1.120.0000.01215.82
7.1.110.0060.00615.63
7.1.100.0030.01015.74
7.1.90.0100.00315.81
7.1.80.0060.00615.86
7.1.70.0120.00315.88
7.1.60.0300.00333.64
7.1.50.0240.01433.86
7.1.40.0220.01033.75
7.1.30.0310.01033.40
7.1.20.0210.00933.40
7.1.10.0060.01015.67
7.1.00.0100.00615.83
5.6.380.0090.01114.50

preferences:
56.08 ms | 400 KiB | 5 Q