3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ["cust_id" => 1006, "no_of_subs" => 2, "dlv_id" => 1000], ["cust_id" => 1011, "no_of_subs" => 3, "dlv_id" => 1000], ["cust_id" => 1012, "no_of_subs" => 5, "dlv_id" => 1001], ["cust_id" => 1013, "no_of_subs" => 6, "dlv_id" => 1001] ]; foreach ($array as $row) { if (!isset($result[$row["dlv_id"]])) { $result[$row["dlv_id"]] = ["dlv_id" => $row["dlv_id"], "no_of_subs" => $row["no_of_subs"]]; } else { $result[$row["dlv_id"]]["no_of_subs"] += $row["no_of_subs"]; } } var_export(array_values($result));

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.5.00.0110.01020.13
8.4.150.0010.00214.05
8.4.140.0110.01017.59
8.4.130.0120.01217.73
8.4.120.0150.00522.14
8.4.110.0100.00918.63
8.4.100.0050.00418.64
8.4.90.0040.00620.58
8.4.80.0060.00618.61
8.4.70.0140.00517.80
8.4.60.0110.00918.83
8.4.50.0080.00218.75
8.4.40.0060.01317.54
8.4.30.0100.01017.49
8.4.20.0120.00920.45
8.4.10.0100.00717.79
8.3.280.0110.01018.51
8.3.270.0110.00916.74
8.3.260.0060.00416.54
8.3.250.0070.01117.22
8.3.240.0090.00816.66
8.3.230.0070.01016.51
8.3.220.0110.00718.80
8.3.210.0130.00616.79
8.3.200.0040.00516.66
8.3.190.0120.00816.92
8.3.180.0100.00417.15
8.3.170.0070.00718.88
8.3.160.0130.00616.60
8.3.150.0160.00318.83
8.3.140.0120.00318.44
8.3.130.0090.00416.55
8.3.120.0190.00518.49
8.3.110.0220.00818.66
8.3.100.0230.00320.14
8.3.90.0150.01221.58
8.3.80.0210.00717.27
8.3.70.0230.00717.32
8.3.60.0230.00617.41
8.3.50.0220.00817.49
8.3.40.0230.00418.12
8.3.30.0140.00918.11
8.3.20.0180.00518.04
8.3.10.0150.00319.68
8.3.00.0040.00920.65
8.2.290.0120.00718.88
8.2.280.0100.00518.10
8.2.270.0180.00017.03
8.2.260.0110.00716.58
8.2.250.0190.00216.54
8.2.240.0160.00517.78
8.2.230.0200.00519.47
8.2.220.0220.00226.97
8.2.210.0160.00621.52
8.2.200.0150.00916.58
8.2.190.0160.01117.22
8.2.180.0170.01017.39
8.2.170.0220.00320.34
8.2.160.0190.00420.00
8.2.150.0170.00420.98
8.2.140.0240.00621.13
8.2.130.0210.00421.66
8.2.120.0180.00719.23
8.2.110.0150.00918.92
8.2.100.0210.00517.81
8.2.90.0130.01017.75
8.2.80.0160.00717.75
8.2.70.0160.00817.70
8.2.60.0190.00517.83
8.2.50.0160.00617.87
8.2.40.0150.00219.42
8.2.30.0100.00319.02
8.2.20.0130.00617.71
8.2.10.0160.00717.69
8.2.00.0140.00517.87
8.1.330.0130.00615.94
8.1.320.0110.00820.00
8.1.310.0090.00016.23
8.1.300.0190.00117.78
8.1.290.0150.00623.51
8.1.280.0190.00721.05
8.1.270.0210.00520.49
8.1.260.0120.00621.86
8.1.250.0190.00122.65
8.1.240.0160.00517.37
8.1.230.0150.00619.98
8.1.220.0130.00917.60
8.1.210.0180.00118.14
8.1.200.0170.00617.32
8.1.190.0170.00517.15
8.1.180.0150.00917.61
8.1.170.0260.00017.88
8.1.160.0260.00117.92
8.1.150.0150.00718.00
8.1.140.0110.01017.98
8.1.130.0130.00817.29
8.1.120.0170.00617.48
8.1.110.0160.00917.30
8.1.100.0160.00417.25
8.1.90.0170.00417.43
8.1.80.0150.00917.28
8.1.70.0150.00717.23
8.1.60.0130.00717.51
8.1.50.0190.00617.43
8.1.40.0220.00317.40
8.1.30.0190.00517.44
8.1.20.0190.00717.31
8.1.10.0210.00317.51
8.1.00.0170.00517.42
8.0.300.0140.00818.15
8.0.290.0220.00216.55
8.0.280.0100.01217.56
8.0.270.0110.01016.58
8.0.260.0210.00216.71
8.0.250.0170.00516.79
8.0.240.0140.00416.72
8.0.230.0070.01116.84
8.0.220.0140.00516.68
8.0.210.0170.00516.61
8.0.200.0160.00316.83
8.0.190.0180.00016.81
8.0.180.0140.00616.74
8.0.170.0150.00516.76
8.0.160.0100.01016.76
8.0.150.0150.00316.65
8.0.140.0150.00316.56
8.0.130.0110.00815.03
8.0.120.0160.00616.70
8.0.110.0170.00416.66
8.0.100.0190.00216.60
8.0.90.0110.01016.69
8.0.80.0100.01416.80
8.0.70.0230.00416.61
8.0.60.0180.00416.71
8.0.50.0120.00816.71
8.0.30.0180.00516.94
8.0.20.0160.00617.18
8.0.10.0180.01116.72
8.0.00.0170.00416.84
7.4.330.0140.00516.00
7.4.320.0100.01016.35
7.4.300.0170.00316.48
7.4.290.0160.00316.40
7.4.280.0180.00416.36
7.4.270.0170.00416.43
7.4.260.0170.00316.32
7.4.250.0130.00716.41
7.4.240.0230.00616.33
7.4.230.0160.00616.28
7.4.220.0140.00616.33
7.4.210.0150.00616.43
7.4.200.0150.00416.27
7.4.190.0270.01016.26
7.4.180.0250.00916.18
7.4.160.0190.00516.44
7.4.150.0160.00716.37
7.4.140.0100.01117.42
7.4.130.0180.00616.44
7.4.120.0120.01016.40
7.4.110.0100.01216.42
7.4.100.0120.01016.43
7.4.90.0140.00816.38
7.4.80.0170.00617.33
7.4.70.0150.00716.45
7.4.60.0150.00716.47
7.4.50.0150.00516.41
7.4.40.0190.00516.41
7.4.30.0160.00616.32
7.4.20.0180.00616.22
7.4.10.0140.00615.88
7.4.00.0080.01115.60
7.3.330.0140.00414.67
7.3.320.0170.00114.69
7.3.310.0120.00716.27
7.3.300.0120.00516.24
7.3.290.0160.00316.25
7.3.280.0170.01016.28
7.3.270.0150.00916.36
7.3.260.0130.01116.46
7.3.250.0230.00316.26
7.3.240.0110.01116.40
7.3.230.0130.00716.42
7.3.220.0100.01116.29
7.3.210.0090.01016.27
7.3.200.0100.01216.41
7.3.190.0100.01316.25
7.3.180.0170.00616.34
7.3.170.0210.00216.31
7.3.160.0150.00516.31
7.3.150.0170.00716.36
7.3.140.0150.00116.22
7.3.130.0100.00615.69
7.3.120.0130.00215.77
7.3.110.0100.01215.86
7.3.100.0130.00615.86
7.3.90.0150.00915.81
7.3.80.0140.00915.74
7.3.70.0130.00715.78
7.3.60.0150.00515.79
7.3.50.0130.00615.78
7.3.40.0120.00615.77
7.3.30.0110.00815.87
7.3.20.0130.00916.42
7.3.10.0140.00416.37
7.3.00.0120.00916.32
7.2.340.0240.00716.46
7.2.330.0210.00716.54
7.2.320.0210.00616.57
7.2.310.0180.01016.48
7.2.300.0150.01216.54
7.2.290.0170.01216.52
7.2.280.0230.01016.36
7.2.270.0180.01116.27
7.2.260.0160.00915.95
7.2.250.0130.01116.00
7.2.240.0190.00815.94
7.2.230.0150.01215.88
7.2.220.0170.00915.94
7.2.210.0180.00916.01
7.2.200.0170.00915.90
7.2.190.0190.00615.92
7.2.180.0180.00616.02
7.2.170.0160.00915.96
7.2.160.0170.00915.93
7.2.150.0170.01016.52
7.2.140.0160.00716.63
7.2.130.0290.00916.65
7.2.120.0220.00816.52
7.2.110.0210.01116.65
7.2.100.0170.01016.24
7.2.90.0280.00716.21
7.2.80.0700.00916.24
7.2.70.0170.00916.26
7.2.60.0640.00816.31
7.2.50.0920.00616.26
7.2.40.1110.00816.17
7.2.30.0260.01116.18
7.2.20.0310.00816.27
7.2.10.0370.00616.21
7.2.00.1010.01016.28
7.1.330.0200.00615.95
7.1.320.0140.01015.91
7.1.310.0190.00715.76
7.1.300.0210.00315.94
7.1.290.0160.00915.91
7.1.280.0210.00915.82
7.1.270.0200.00415.82
7.1.260.0170.00715.78
7.1.250.0180.00415.92
7.1.240.0310.00915.89
7.1.230.0190.00615.86
7.1.220.0180.00515.33
7.1.210.1040.00515.40
7.1.200.0590.00815.44
7.1.190.0660.00715.41
7.1.180.0730.00915.33
7.1.170.1010.00915.27
7.1.160.0670.00815.34
7.1.150.0220.00615.47
7.1.140.0230.00415.45
7.1.130.0940.00615.34
7.1.120.0150.01015.34
7.1.110.0170.00715.35
7.1.100.0230.00915.42
7.1.90.0310.01115.35
7.1.80.1360.00815.40
7.1.70.1250.01115.42
7.1.60.1290.00819.87
7.1.50.1910.00519.93
7.1.40.1920.00919.74
7.1.30.1910.00719.77
7.1.20.1720.00519.82
7.1.10.1400.00615.18
7.1.00.1070.00715.30
7.0.330.0140.01015.65
7.0.320.0100.00815.53
7.0.310.0200.00315.65
7.0.300.0180.00515.48
7.0.290.0160.00715.64
7.0.280.0190.00715.64
7.0.270.0190.00515.52
7.0.260.0150.01015.64
7.0.250.0130.00915.63
7.0.240.0150.01015.65
7.0.230.0230.00815.68
7.0.220.0190.00815.62
7.0.210.0180.00915.72
7.0.200.0250.00415.59
7.0.190.0170.00915.55
7.0.180.0140.00915.66
7.0.170.0160.00715.74
7.0.160.0150.00715.55
7.0.150.0150.01015.73
7.0.140.0320.00715.56
7.0.130.0110.01015.72
7.0.120.0170.00515.51
7.0.110.0150.01515.52
7.0.100.0150.00615.67
7.0.90.0170.00715.66
7.0.80.0170.00615.58
7.0.70.0180.00215.60
7.0.60.0150.00615.65
7.0.50.0180.00515.61
7.0.40.0110.01315.01
7.0.30.0110.00614.97
7.0.20.0170.00614.88
7.0.10.0120.01015.01
7.0.00.0190.00415.02
5.6.400.0170.00815.53
5.6.390.0210.00415.51
5.6.380.0120.00915.31
5.6.370.0130.00915.54
5.6.360.0160.00615.67
5.6.350.0140.01015.47
5.6.340.0160.00815.63
5.6.330.0150.00915.38
5.6.320.0140.01015.57
5.6.310.0200.00415.66
5.6.300.0140.01215.53
5.6.290.0140.00915.66
5.6.280.0160.00815.47
5.6.270.0150.00715.48
5.6.260.0130.00815.53
5.6.250.0150.00715.48
5.6.240.0130.01315.56
5.6.230.0130.00815.57
5.6.220.0140.00815.51
5.6.210.0160.00615.52
5.6.200.0190.00415.49
5.6.190.0170.00715.56
5.6.180.0190.00815.52
5.6.170.0140.01715.57
5.6.160.0140.01015.55
5.6.150.0150.00815.56
5.6.140.0180.00315.51
5.6.130.0140.00915.59
5.6.120.0150.00715.52
5.6.110.0140.00815.53
5.6.100.0180.00515.58
5.6.90.0170.00715.64
5.6.80.0130.00815.42
5.6.70.0150.00815.53
5.6.60.0170.00615.40
5.6.50.0100.01315.34
5.6.40.0160.00915.59
5.6.30.0140.01015.51
5.6.20.0150.00915.40
5.6.10.0130.00915.55
5.6.00.0160.00515.51

preferences:
150.07 ms | 403 KiB | 5 Q