3v4l.org

run code in 300+ PHP versions simultaneously
<?php $profits = array(5,7,2,4,7,3,6); for($i = 0, $length = count($profits); $i < $length; $i++) { $sixMonthAvg = array_slice($profits, ($i - 5 >= 0 ?$i - 5:0), $i); echo round(array_sum($sixMonthAvg) / count($sixMonthAvg), 2) . PHP_EOL; }

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.00716.50
8.3.50.0070.01421.10
8.3.40.0090.00618.59
8.3.30.0040.01118.73
8.3.20.0070.00020.04
8.3.10.0080.00023.55
8.3.00.0070.00023.51
8.2.180.0160.00618.29
8.2.170.0090.00622.96
8.2.160.0070.00720.37
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00521.05
8.2.120.0050.00326.35
8.2.110.0060.00322.08
8.2.100.0120.00017.91
8.2.90.0040.00417.75
8.2.80.0000.00817.97
8.2.70.0050.00317.93
8.2.60.0030.00617.80
8.2.50.0000.00818.10
8.2.40.0000.00720.59
8.2.30.0000.00720.60
8.2.20.0040.00417.80
8.2.10.0000.00818.11
8.2.00.0030.00518.10
8.1.280.0100.01025.92
8.1.270.0080.00023.82
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0040.00423.84
8.1.230.0070.00418.99
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0000.00917.13
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0000.00818.47
8.1.160.0040.00420.70
8.1.150.0000.00718.79
8.1.140.0000.01019.61
8.1.130.0000.00717.59
8.1.120.0000.00717.48
8.1.110.0000.00717.38
8.1.100.0040.00417.48
8.1.90.0000.00817.39
8.1.80.0050.00317.32
8.1.70.0080.00017.45
8.1.60.0030.00617.47
8.1.50.0030.00617.54
8.1.40.0050.00217.39
8.1.30.0000.00817.57
8.1.20.0060.00317.61
8.1.10.0080.00017.57
8.1.00.0030.00517.38
8.0.300.0040.00419.78
8.0.290.0080.00016.73
8.0.280.0000.00718.51
8.0.270.0000.00817.14
8.0.260.0030.00317.25
8.0.250.0060.00016.90
8.0.240.0000.00717.00
8.0.230.0040.00417.01
8.0.220.0030.00316.83
8.0.210.0030.00616.84
8.0.200.0040.00416.96
8.0.190.0080.00016.93
8.0.180.0080.00016.79
8.0.170.0000.00816.92
8.0.160.0070.00016.90
8.0.150.0080.00016.92
8.0.140.0040.00416.88
8.0.130.0030.00313.32
8.0.120.0040.00416.94
8.0.110.0040.00416.82
8.0.100.0030.00616.73
8.0.90.0000.00816.89
8.0.80.0080.00516.86
8.0.70.0050.00316.79
8.0.60.0000.00716.90
8.0.50.0060.00316.91
8.0.30.0090.00817.17
8.0.20.0120.00717.40
8.0.10.0040.00417.11
8.0.00.0120.00916.72
7.4.330.0030.00316.90
7.4.320.0000.00616.68
7.4.300.0000.00616.67
7.4.290.0000.00716.47
7.4.280.0000.00916.64
7.4.270.0040.00416.45
7.4.260.0070.00016.68
7.4.250.0040.00416.57
7.4.240.0000.00716.60
7.4.230.0030.00316.52
7.4.220.0070.01316.54
7.4.210.0070.00716.67
7.4.200.0040.00316.59
7.4.160.0150.00716.75
7.4.150.0070.01117.40
7.4.140.0090.01217.86
7.4.130.0110.00716.67
7.4.120.0110.00916.57
7.4.110.0200.00316.48
7.4.100.0070.01016.55
7.4.90.0070.01016.57
7.4.80.0100.00719.39
7.4.70.0100.01316.50
7.4.60.0100.00716.56
7.4.50.0060.00716.64
7.4.40.0100.00616.61
7.4.30.0080.01216.66
7.4.00.0030.01215.07
7.3.330.0050.00013.11
7.3.320.0040.00413.10
7.3.310.0000.00816.39
7.3.300.0000.00716.18
7.3.290.0080.00616.36
7.3.280.0070.00816.38
7.3.270.0070.01017.40
7.3.260.0040.01316.51
7.3.250.0110.00816.59
7.3.240.0100.00716.44
7.3.230.0130.00316.55
7.3.210.0130.00316.54
7.3.200.0060.01316.45
7.3.190.0030.01816.54
7.3.180.0030.01316.39
7.3.170.0030.01416.39
7.3.160.0060.01116.45
7.2.330.0070.01116.76
7.2.320.0150.00416.40
7.2.310.0140.00416.86
7.2.300.0100.00716.85
7.2.290.0100.00616.55
7.2.60.0120.00317.06
7.2.00.0030.00919.49
7.1.200.0050.00316.03
7.1.100.0030.00918.38
7.1.70.0000.00817.18
7.1.60.0130.01319.52
7.1.50.0100.00734.83
7.1.00.0030.07722.34
7.0.200.0060.00614.74
7.0.60.0100.03320.02
7.0.50.0030.04717.80
7.0.40.0170.06719.98
7.0.30.0370.07020.01
7.0.20.0100.04720.18
7.0.10.0030.09020.09
7.0.00.0070.04320.08
5.6.280.0000.07021.07
5.6.210.0100.07020.71
5.6.200.0100.05718.16
5.6.190.0030.05020.45
5.6.180.0230.08320.49
5.6.170.0130.04320.55
5.6.160.0000.04720.57
5.6.150.0070.07718.21
5.6.140.0130.07318.13
5.6.130.0030.05718.19
5.6.120.0130.05720.89
5.6.110.0230.07321.13
5.6.100.0000.04721.03
5.6.90.0230.02720.99
5.6.80.0030.08020.28
5.5.350.4300.04720.42
5.5.340.0100.07317.93
5.5.330.0030.08720.23
5.5.320.0300.03320.17
5.5.310.0200.04020.19
5.5.300.0070.06018.04
5.5.290.0030.04018.01
5.5.280.0030.07720.68
5.5.270.0130.04320.67
5.5.260.0100.08020.67
5.5.250.0100.06720.68
5.5.240.0000.03320.11

preferences:
55.59 ms | 401 KiB | 5 Q