3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = (new DateTime('1 year ago'))->modify('first day of month'); $end = (new DateTime())->modify('first day of month'); $interval = new DateInterval('P1M'); $period = new DatePeriod($start, $interval, $end); $months = array(); foreach ($period as $dt) { $months[] = $dt->format('Y-m-d'); } $reverse_months = array_reverse($months); print_r($reverse_months);

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.0100.01018.68
8.3.50.0110.00521.98
8.3.40.0150.00019.14
8.3.30.0120.00919.21
8.3.20.0040.00420.16
8.3.10.0000.00822.05
8.3.00.0040.00422.46
8.2.180.0070.00716.75
8.2.170.0040.01122.96
8.2.160.0070.00720.93
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0100.00326.16
8.2.120.0030.00519.38
8.2.110.0080.00022.23
8.2.100.0090.00319.59
8.2.90.0030.00619.36
8.2.80.0040.00417.97
8.2.70.0030.00617.74
8.2.60.0030.00517.93
8.2.50.0060.00318.07
8.2.40.0000.00818.34
8.2.30.0090.00018.23
8.2.20.0000.00818.01
8.2.10.0040.00417.93
8.2.00.0000.00817.97
8.1.280.0100.01625.92
8.1.270.0050.00222.32
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0080.00419.46
8.1.230.0100.00019.22
8.1.220.0030.00617.78
8.1.210.0000.00818.77
8.1.200.0060.00317.60
8.1.190.0000.00817.66
8.1.180.0040.00418.85
8.1.170.0030.00518.59
8.1.160.0050.00221.96
8.1.150.0040.00418.78
8.1.140.0000.00717.59
8.1.130.0070.00017.93
8.1.120.0040.00417.61
8.1.110.0030.00617.52
8.1.100.0030.00517.67
8.1.90.0000.00817.57
8.1.80.0050.00317.63
8.1.70.0000.00717.63
8.1.60.0040.00417.66
8.1.50.0080.00017.72
8.1.40.0040.00417.64
8.1.30.0030.00617.81
8.1.20.0000.00817.85
8.1.10.0080.00017.73
8.1.00.0040.00417.80
8.0.300.0070.00018.77
8.0.290.0000.00717.43
8.0.280.0030.00318.41
8.0.270.0030.00317.36
8.0.260.0040.00417.10
8.0.250.0000.00717.32
8.0.240.0000.00717.25
8.0.230.0030.00317.31
8.0.220.0030.00517.11
8.0.210.0070.00017.07
8.0.200.0000.00617.25
8.0.190.0040.00417.27
8.0.180.0040.00417.19
8.0.170.0000.00717.09
8.0.160.0000.00717.20
8.0.150.0040.00417.15
8.0.140.0000.00717.14
8.0.130.0030.00313.50
8.0.120.0000.00717.06
8.0.110.0000.00717.16
8.0.100.0050.00217.30
8.0.90.0040.00417.08
8.0.80.0030.01617.14
8.0.70.0000.00717.09
8.0.60.0080.00017.16
8.0.50.0000.00817.25
8.0.30.0140.00917.45
8.0.20.0090.00817.40
8.0.10.0050.00317.38
8.0.00.0080.01016.88
7.4.330.0000.00515.06
7.4.320.0000.00716.57
7.4.300.0000.00716.65
7.4.290.0040.00416.81
7.4.280.0030.00316.76
7.4.270.0060.00316.78
7.4.260.0000.00716.71
7.4.250.0050.00316.70
7.4.240.0000.00716.68
7.4.230.0030.00316.63
7.4.220.0060.01216.93
7.4.210.0060.00916.81
7.4.200.0020.00516.72
7.4.190.0030.00316.97
7.4.160.0100.00616.69
7.4.150.0060.01217.40
7.4.140.0130.00517.86
7.4.130.0110.01116.82
7.4.120.0090.01016.92
7.4.110.0040.01416.80
7.4.100.0160.00316.86
7.4.90.0120.00616.58
7.4.80.0150.00319.39
7.4.70.0160.00716.70
7.4.60.0070.01116.81
7.4.50.0060.00317.00
7.4.40.0030.00922.77
7.4.30.0060.01516.64
7.4.00.0030.01015.24
7.3.330.0000.00513.40
7.3.320.0050.00013.41
7.3.310.0000.00616.61
7.3.300.0000.00716.34
7.3.290.0030.01016.57
7.3.280.0100.00816.50
7.3.270.0110.00717.40
7.3.260.0140.00316.68
7.3.250.0110.00716.68
7.3.240.0070.01016.72
7.3.230.0160.00016.51
7.3.210.0070.01616.61
7.3.200.0100.00719.39
7.3.190.0100.00716.52
7.3.180.0160.00016.53
7.3.170.0130.00616.70
7.3.160.0090.00616.60
7.3.120.0070.01114.98
7.2.330.0120.01217.00
7.2.320.0070.01016.85
7.2.310.0070.01416.89
7.2.300.0080.00816.50
7.2.290.0070.01516.91
7.2.60.0170.00716.29
7.2.00.0000.01419.29
7.1.200.0030.00616.05
7.1.100.0080.00418.11
7.1.70.0030.00617.33
7.1.60.0100.01419.82
7.1.50.0180.00717.03
7.1.00.0000.07722.50
7.0.200.0030.00817.02
7.0.140.0000.07321.99
7.0.60.0000.05020.01
7.0.50.0070.04017.93
7.0.40.0100.06720.03
7.0.30.0230.04720.18
7.0.20.0330.05720.20
7.0.10.0000.06320.21
7.0.00.0070.04020.20
5.6.280.0100.06721.07
5.6.210.0070.07720.72
5.6.200.0100.08318.29
5.6.190.0070.05720.61
5.6.180.0330.06720.41
5.6.170.0270.07320.62
5.6.160.0100.08020.61
5.6.150.0100.05018.27
5.6.140.0070.05718.16
5.6.130.0130.07018.15
5.6.120.0100.08021.05
5.6.110.0030.07021.11
5.6.100.0070.06320.95
5.6.90.0170.05721.00
5.6.80.0000.04020.36
5.5.350.0070.07720.37
5.5.340.0100.07718.08
5.5.330.0100.05320.18
5.5.320.0230.03320.26
5.5.310.0270.05320.23
5.5.300.0030.03718.01
5.5.290.0130.07717.99
5.5.280.0100.08020.73
5.5.270.0100.07320.86
5.5.260.0100.07020.84
5.5.250.0070.07720.68
5.5.240.0270.06020.15
5.4.450.0300.06019.17
5.4.440.0170.05719.41
5.4.430.0100.05719.54
5.4.420.0100.06319.57
5.4.410.0100.05719.20
5.4.400.0900.05719.27
5.4.390.0730.05719.23
5.4.380.0270.05318.73
5.4.370.0230.05318.80
5.4.360.0270.05018.46
5.4.350.0130.07318.74
5.4.340.0400.05718.61
5.4.320.0050.03812.50
5.4.310.0060.03712.50
5.4.300.0030.03812.50
5.4.290.0030.04912.50
5.4.280.0070.03312.40
5.4.270.0100.03212.40
5.4.260.0070.05318.79
5.4.250.0030.05718.88
5.4.240.0100.05018.88
5.4.230.0130.07018.88
5.4.220.0130.06018.63
5.4.210.0130.04318.63
5.4.200.0070.05018.95
5.4.190.0100.04718.72
5.4.180.0130.06318.63
5.4.170.0100.07018.72
5.4.160.0130.04318.94
5.4.150.0070.05318.89
5.4.140.0100.05016.46
5.4.130.0030.05716.63
5.4.120.0030.05016.44
5.4.110.0100.05016.54
5.4.100.0100.04316.46
5.4.90.0100.04316.61
5.4.80.0070.05016.64
5.4.70.0030.05316.36
5.4.60.0100.04716.55
5.4.50.0000.07716.54
5.4.40.0000.05716.39
5.4.30.0000.06716.45
5.4.20.0130.04016.52
5.4.10.0070.05016.35
5.4.00.0030.05015.84
5.3.290.0070.03912.80
5.3.280.0130.05714.59
5.3.270.0070.05014.61
5.3.260.0070.05014.62
5.3.250.0070.05014.61
5.3.240.0030.05314.70
5.3.230.0070.05014.64
5.3.220.0030.05314.57
5.3.210.0070.05014.57
5.3.200.0030.05014.42
5.3.190.0070.05014.57
5.3.180.0000.05314.28
5.3.170.0070.04714.47
5.3.160.0000.05314.61
5.3.150.0000.05714.56
5.3.140.0070.06014.42
5.3.130.0100.05714.57
5.3.120.0100.05014.54
5.3.110.0070.06014.39
5.3.100.0070.05014.05
5.3.90.0070.05314.04
5.3.80.0070.05014.07
5.3.70.0170.04713.96
5.3.60.0230.04013.86
5.3.50.0030.05013.99
5.3.40.0070.07014.06
5.3.30.0170.04313.95
5.3.20.0030.05013.79
5.3.10.0030.04713.42
5.3.00.0100.04313.79
5.2.170.0100.04011.02
5.2.160.0000.04311.15
5.2.150.0000.04711.03
5.2.140.0000.07011.14
5.2.130.0070.03711.21
5.2.120.0100.03311.20
5.2.110.0070.04711.25
5.2.100.0070.03311.10
5.2.90.0070.03710.98
5.2.80.0070.05011.13
5.2.70.0130.03311.00
5.2.60.0030.05311.07
5.2.50.0100.03710.96
5.2.40.0070.03710.99
5.2.30.0000.04310.97
5.2.20.0130.03011.11
5.2.10.0000.04010.94
5.2.00.0130.05010.79
5.1.60.0030.04710.08
5.1.50.0000.0379.85
5.1.40.0000.0379.93
5.1.30.0030.03710.17
5.1.20.0000.04010.43
5.1.10.0030.04010.10
5.1.00.0070.0339.84
5.0.50.0000.0308.43
5.0.40.0070.0338.43
5.0.30.0100.0478.25
5.0.20.0070.0278.15
5.0.10.0030.0278.08
5.0.00.0030.0508.25
4.4.90.0030.0207.58
4.4.80.0000.0237.58
4.4.70.0030.0207.58
4.4.60.0000.0237.58
4.4.50.0000.0237.58
4.4.40.0070.0307.58
4.4.30.0070.0137.58
4.4.20.0000.0237.58
4.4.10.0000.0237.58
4.4.00.0000.0337.46
4.3.110.0030.0207.46
4.3.100.0000.0237.46
4.3.90.0030.0277.46
4.3.80.0030.0337.46
4.3.70.0070.0177.46
4.3.60.0000.0207.46
4.3.50.0030.0207.46
4.3.40.0000.0337.46
4.3.30.0070.0177.46
4.3.20.0030.0207.46
4.3.10.0000.0237.46
4.3.00.0030.0238.12

preferences:
47.38 ms | 401 KiB | 5 Q