3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_list= array("Jan 2016"=>2, "Feb 2016"=>4, "Mar 2016"=>2,"Apr 2016"=>0, "Jan 2017"=>9,"Feb 2017"=>2,"Mar 2017"=>5,"Jan 2018"=>4,"Feb 2018"=>6); foreach(array_keys($array_list) as $key){ $years[] = explode(" ", $key)[1]; } foreach(array_unique($years) as $year){ $res[$year] = array_sum(array_intersect_key(array_values($array_list), array_intersect($years, [$year]))); } var_dump($res);

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.0130.00624.23
8.4.110.0120.00718.82
8.4.100.0050.00417.75
8.4.90.0120.00918.69
8.4.80.0130.00819.60
8.4.70.0060.00217.86
8.4.60.0110.00618.99
8.4.50.0120.00820.50
8.4.40.0170.00317.59
8.4.30.0130.00717.73
8.4.20.0070.01419.51
8.4.10.0110.00720.48
8.3.250.0070.01119.05
8.3.240.0120.00717.15
8.3.230.0110.00816.68
8.3.220.0080.01017.06
8.3.210.0140.00516.54
8.3.200.0060.00316.71
8.3.190.0140.00517.40
8.3.180.0030.00516.72
8.3.170.0130.00717.06
8.3.160.0120.00620.35
8.3.150.0030.00516.58
8.3.140.0070.00017.42
8.3.130.0050.00318.60
8.3.120.0000.01018.79
8.3.110.0120.00920.94
8.3.100.0080.01224.06
8.3.90.0190.00026.77
8.3.80.0080.00018.43
8.3.70.0180.00416.50
8.3.60.0120.00618.52
8.3.50.0110.00518.13
8.3.40.0070.00718.79
8.3.30.0070.00718.71
8.3.20.0050.00319.20
8.3.10.0050.00321.78
8.3.00.0040.00419.79
8.2.290.0100.00820.27
8.2.280.0050.01018.55
8.2.270.0060.01317.05
8.2.260.0040.00418.88
8.2.250.0040.00418.46
8.2.240.0070.01018.86
8.2.230.0110.00422.58
8.2.220.0170.00737.54
8.2.210.0030.00626.77
8.2.200.0040.00416.75
8.2.190.0100.01416.72
8.2.180.0140.00416.38
8.2.170.0150.00322.96
8.2.160.0070.00720.47
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00419.83
8.2.120.0070.00026.35
8.2.110.0100.00019.13
8.2.100.0070.00417.91
8.2.90.0030.00717.91
8.2.80.0030.00618.09
8.2.70.0000.00817.63
8.2.60.0040.00417.75
8.2.50.0060.00317.63
8.2.40.0000.00819.14
8.2.30.0040.00419.58
8.2.20.0040.00418.02
8.2.10.0070.00418.15
8.2.00.0040.00419.20
8.1.330.0100.00722.22
8.1.320.0120.00716.13
8.1.310.0090.00920.31
8.1.300.0030.00618.34
8.1.290.0060.00330.84
8.1.280.0120.00825.92
8.1.270.0080.00023.93
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0050.00522.59
8.1.230.0120.00022.67
8.1.220.0000.00817.77
8.1.210.0030.00518.77
8.1.200.0000.01117.35
8.1.190.0000.00917.50
8.1.180.0060.00318.10
8.1.170.0060.00318.66
8.1.160.0020.00518.93
8.1.150.0000.00918.75
8.1.140.0000.00817.66
8.1.130.0080.00019.00
8.1.120.0030.00317.36
8.1.110.0030.00617.37
8.1.100.0080.00017.52
8.1.90.0040.00417.47
8.1.80.0030.00417.51
8.1.70.0040.00417.46
8.1.60.0050.00317.54
8.1.50.0030.00517.51
8.1.40.0100.00017.52
8.1.30.0070.00417.68
8.1.20.0080.00017.54
8.1.10.0050.00317.55
8.1.00.0070.00017.40
8.0.300.0040.00419.98
8.0.290.0070.00016.75
8.0.280.0000.00918.37
8.0.270.0040.00417.27
8.0.260.0050.00517.34
8.0.250.0060.00016.99
8.0.240.0070.00016.93
8.0.230.0000.00616.91
8.0.220.0000.00716.99
8.0.210.0000.00716.90
8.0.200.0030.00316.96
8.0.190.0000.00716.98
8.0.180.0070.00016.92
8.0.170.0040.00416.94
8.0.160.0070.00016.97
8.0.150.0000.00716.87
8.0.140.0000.00716.77
8.0.130.0000.00513.32
8.0.120.0040.00416.82
8.0.110.0000.00716.80
8.0.100.0050.00316.76
8.0.90.0080.00016.78
8.0.80.0060.01016.91
8.0.70.0000.00716.82
8.0.60.0000.00716.80
8.0.50.0040.00416.90
8.0.30.0080.01017.10
8.0.20.0100.00917.40
8.0.10.0040.00417.00
8.0.00.0080.00916.81
7.4.330.0000.00516.72
7.4.320.0060.00016.54
7.4.300.0000.00616.53
7.4.290.0040.00416.59
7.4.280.0080.00016.52
7.4.270.0040.00416.60
7.4.260.0070.00016.62
7.4.250.0040.00416.56
7.4.240.0030.00316.60
7.4.230.0030.00316.73
7.4.220.0040.00416.70
7.4.210.0150.00816.61
7.4.200.0070.00016.66
7.4.160.0110.00516.54
7.4.140.0150.00717.86
7.4.130.0060.01016.38
7.4.120.0080.01016.56
7.4.110.0090.00916.54
7.4.100.0100.00716.60
7.4.90.0120.00616.68
7.4.80.0130.01019.39
7.4.70.0100.00616.46
7.4.60.0130.00316.50
7.4.50.0120.00316.53
7.4.40.0030.01816.37
7.4.00.0070.01015.25
7.3.330.0030.00313.33
7.3.320.0030.00313.10
7.3.310.0000.00616.18
7.3.300.0040.00416.35
7.3.290.0000.00616.36
7.3.280.0030.01016.34
7.3.260.0180.00616.31
7.3.240.0070.00916.54
7.3.230.0110.00616.49
7.3.210.0110.01116.25
7.3.200.0130.00616.46
7.3.190.0060.01216.69
7.3.180.0180.00016.33
7.3.170.0090.00616.57
7.3.160.0030.01216.51
7.3.10.0110.00416.76
7.3.00.0120.00316.57
7.2.330.0100.01316.41
7.2.320.0070.01116.51
7.2.310.0130.00716.73
7.2.300.0170.00016.62
7.2.290.0060.01016.53
7.2.130.0030.01016.84
7.2.120.0130.00317.01
7.2.110.0030.01316.95
7.2.100.0080.00317.11
7.2.90.0030.01317.03
7.2.80.0080.00817.02
7.2.70.0000.01417.11
7.2.60.0020.01416.90
7.2.50.0060.00817.03
7.2.40.0300.01017.38
7.2.30.0750.00817.54
7.2.20.0300.00917.60
7.2.10.0350.01017.54
7.2.00.0420.00817.57
7.1.250.0110.00015.77
7.1.200.0040.00815.84
7.1.160.0840.00916.96
7.1.150.0640.01017.07
7.1.140.0570.00916.75
7.1.130.0700.01016.96
7.1.120.0720.00616.39
7.1.110.0610.00716.05
7.1.100.0570.00515.90
7.1.90.0520.00915.94
7.1.80.0680.00616.03
7.1.70.0710.00915.50
7.1.60.1050.01433.32
7.1.50.0750.01132.96
7.1.40.0760.01632.55
7.1.30.0770.00932.53
7.1.20.0730.01332.78
7.1.10.0800.00814.51
7.1.00.0860.00514.88

preferences:
28.5 ms | 403 KiB | 5 Q