3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruitpacks = [ ['apples', 3], ['pears', 1], ['apples', 6], ['grapes', 22], ]; abstract class ⁇ { public static function ➕=(&$maybeDefined, int $value) { $maybeDefined = ($maybeDefined ?? 0) + $value; } } $totals_by_name = []; foreach ($fruitpacks as [$name, $amount]) { ⁇::➕=($totals_by_name[$name], $amount); } var_dump($totals_by_name);

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.0160.00318.30
8.3.50.0120.00316.61
8.3.40.0060.00918.85
8.3.30.0070.00718.84
8.3.20.0030.00620.30
8.3.10.0000.00821.85
8.3.00.0090.00019.16
8.2.180.0070.00716.38
8.2.170.0070.00722.96
8.2.160.0070.00722.13
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00022.20
8.2.120.0040.00426.35
8.2.110.0030.00620.99
8.2.100.0000.01217.97
8.2.90.0000.00819.34
8.2.80.0000.00917.97
8.2.70.0030.00617.62
8.2.60.0000.00817.93
8.2.50.0040.00418.25
8.2.40.0060.00320.60
8.2.30.0000.00721.02
8.2.20.0040.00418.13
8.2.10.0060.00318.03
8.2.00.0040.00418.34
8.1.280.0040.01125.92
8.1.270.0060.00320.00
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0190.00319.51
8.1.230.0030.00717.89
8.1.220.0070.00017.74
8.1.210.0030.00518.77
8.1.200.0080.00017.25
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0000.00918.59
8.1.160.0070.00018.90
8.1.150.0080.00020.75
8.1.140.0070.00017.68
8.1.130.0030.00318.97
8.1.120.0000.00717.39
8.1.110.0030.00417.47
8.1.100.0050.00517.35
8.1.90.0000.00817.39
8.1.80.0000.00717.37
8.1.70.0030.00317.34
8.1.60.0060.00317.62
8.1.50.0060.00317.41
8.1.40.0040.00417.39
8.1.30.0040.00417.53
8.1.20.0040.00417.66
8.1.10.0070.00017.48
8.1.00.0060.00317.61
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0030.00316.79
8.0.260.0050.00218.94
8.0.250.0030.00317.03
8.0.240.0060.00317.03
8.0.230.0070.00017.04
8.0.220.0000.00717.01
8.0.210.0000.00716.97
8.0.200.0050.00316.91
8.0.190.0030.00617.05
8.0.180.0040.00416.91
8.0.170.0040.00416.86
8.0.160.0000.00716.97
8.0.150.0070.00016.87
8.0.140.0050.00516.80
8.0.130.0000.00613.42
8.0.120.0000.00716.90
8.0.110.0000.00716.84
8.0.100.0030.00516.89
8.0.90.0040.00416.83
8.0.80.0090.01316.87
8.0.70.0020.00516.75
8.0.60.0030.00617.02
8.0.50.0000.00716.90
8.0.30.0100.00917.19
8.0.20.0110.00917.40
8.0.10.0000.00717.01
8.0.00.0090.01216.66
7.4.330.0050.00015.55
7.4.320.0000.00616.56
7.4.300.0000.00616.49
7.4.290.0000.00716.59
7.4.280.0040.00416.47
7.4.270.0040.00416.61
7.4.260.0030.00316.59
7.4.250.0070.00016.33
7.4.240.0030.00316.61
7.4.230.0040.00416.63
7.4.220.0080.00016.44
7.4.210.0090.00816.59
7.4.200.0030.00316.50
7.4.160.0080.00916.52
7.4.150.0080.00917.40
7.4.140.0110.01117.86
7.4.130.0110.01016.30
7.4.120.0140.00716.33
7.4.110.0040.01516.71
7.4.100.0000.01716.54
7.4.90.0030.01416.57
7.4.80.0030.01419.39
7.4.70.0120.00516.39
7.4.60.0100.01016.50
7.4.50.0070.01016.65
7.4.40.0120.00316.48
7.4.10.0100.00715.09
7.4.00.0070.01114.92
7.3.330.0030.00313.37
7.3.320.0000.00813.33
7.3.310.0070.00016.41
7.3.300.0000.00716.34
7.3.290.0000.00616.47
7.3.280.0030.01216.29
7.3.270.0140.00317.40
7.3.260.0150.00716.47
7.3.250.0090.00816.36
7.3.240.0110.01016.36
7.3.230.0130.00416.30
7.3.210.0070.01016.50
7.3.200.0110.00616.28
7.3.190.0130.00316.43
7.3.180.0120.00416.47
7.3.170.0090.00616.41
7.3.160.0110.01116.40
7.3.130.0100.01015.11
7.3.120.0090.00915.11
7.3.110.0030.01314.95
7.3.100.0100.00314.52
7.3.90.0060.00314.61
7.3.80.0070.00715.04
7.3.70.0090.00314.66
7.3.60.0000.01014.95
7.3.50.0060.00614.84
7.3.40.0070.00714.95
7.3.30.0040.01114.89
7.3.20.0150.00016.53
7.3.10.0030.00716.81
7.3.00.0040.00716.73
7.2.330.0140.00716.80
7.2.320.0140.00316.41
7.2.310.0060.01016.86
7.2.300.0090.00916.77
7.2.290.0070.01016.77
7.2.260.0070.01014.95
7.2.250.0040.01215.30
7.2.240.0060.00914.90
7.2.230.0130.00315.21
7.2.220.0070.00715.03
7.2.210.0060.00614.93
7.2.200.0030.00615.15
7.2.190.0040.01114.90
7.2.180.0000.01315.11
7.2.170.0070.00715.22
7.2.160.0000.01115.13
7.2.150.0040.00816.98
7.2.140.0040.01117.18
7.2.130.0070.00616.94
7.2.120.0060.00716.87
7.2.110.0050.00716.76
7.2.100.0090.00316.93
7.2.90.0020.01317.05
7.2.80.0050.00817.08
7.2.70.0050.00516.95
7.2.60.0060.00717.02
7.2.50.0040.01117.02
7.2.40.0020.00716.92
7.2.30.0090.00517.04
7.2.20.0070.00516.95
7.2.10.0060.00717.97
7.2.00.0080.00517.84
7.1.330.0000.01315.91
7.1.320.0060.01215.90
7.1.310.0070.00716.04
7.1.300.0090.00315.75
7.1.290.0060.00915.75
7.1.280.0070.00715.81
7.1.270.0000.00815.73
7.1.260.0040.00915.95
7.1.250.0080.00515.86
7.1.240.0080.00415.70
7.1.230.0030.00915.71
7.1.220.0030.01315.71
7.1.210.0000.01415.52
7.1.200.0020.01315.79
7.1.190.0030.01015.49
7.1.180.0000.00815.80
7.1.170.0060.01015.73
7.1.160.0040.00415.96
7.1.150.0030.00915.85
7.1.140.0060.00615.52
7.1.130.0070.00717.11
7.1.120.0040.01117.35
7.1.110.0040.00817.07
7.1.100.0080.00316.84
7.1.90.0050.00916.90
7.1.80.0060.01117.16
7.1.70.0070.00616.43
7.1.60.0110.00825.38
7.1.50.0080.01425.17
7.1.40.0120.01225.01
7.1.30.0090.01125.09
7.1.20.0120.01025.19
7.1.10.0050.00715.99
7.1.00.0030.01216.35
7.0.330.0080.00615.31
7.0.320.0030.01015.06
7.0.310.0060.00915.56
7.0.300.0030.01015.20
7.0.290.0060.00615.08
7.0.280.0030.00615.34
7.0.270.0040.01215.20
7.0.260.0090.00315.27
7.0.250.0110.00415.28
7.0.240.0070.00715.21
7.0.230.0070.00315.21
7.0.220.0040.01115.22
7.0.210.0030.00715.25
7.0.200.0070.00715.07
7.0.190.0040.01115.26
7.0.180.0000.01415.34
7.0.170.0040.00815.18
7.0.160.0090.00615.27
7.0.150.0060.00915.39
7.0.140.0040.01115.35
7.0.130.0080.00015.14
7.0.120.0030.01015.46
7.0.110.0030.00615.39
7.0.100.0030.01015.45
7.0.90.0090.00315.37
7.0.80.0040.00415.20
7.0.70.0080.00315.34
7.0.60.0000.01415.34
7.0.50.0060.00615.52
7.0.40.0000.01413.43
7.0.30.0060.00613.31
7.0.20.0000.01313.45
7.0.10.0080.00313.39
7.0.00.0100.00313.43
5.6.400.0070.00713.88
5.6.390.0100.00714.28
5.6.380.0030.00714.38
5.6.370.0000.01314.36
5.6.360.0080.00414.32
5.6.350.0030.00614.00
5.6.340.0070.00714.17
5.6.330.0060.00314.11
5.6.320.0080.00414.26
5.6.310.0060.00914.13
5.6.300.0110.00414.09
5.6.290.0000.01514.25
5.6.280.0110.00014.01
5.6.270.0040.01114.13
5.6.260.0130.00313.95
5.6.250.0000.01214.24
5.6.240.0070.00714.34
5.6.230.0030.00914.38
5.6.220.0070.01013.98
5.6.210.0140.00014.03
5.6.200.0110.00414.27
5.6.190.0060.00913.80
5.6.180.0060.00613.95
5.6.170.0100.00313.97
5.6.160.0030.00914.10
5.6.150.0000.01514.23
5.6.140.0040.00414.52
5.6.130.0110.00013.93
5.6.120.0000.01114.11
5.6.110.0060.00714.09
5.6.100.0060.00614.11
5.6.90.0040.00813.88
5.6.80.0000.01414.16
5.6.70.0060.00314.11
5.6.60.0030.00514.13
5.6.50.0040.00414.05
5.6.40.0030.01114.10
5.6.30.0070.00714.14
5.6.20.0100.00314.01
5.6.10.0030.00914.10
5.6.00.0100.00613.96

preferences:
48 ms | 400 KiB | 5 Q