3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = (new DateTime('2010-12-02'))->modify('first day of this month'); $end = (new DateTime('2012-05-06'))->modify('first day of this month'); $interval = DateInterval::createFromDateString('1 month'); $period = new DatePeriod($start, $interval, $end); $months = array(); foreach ($period as $dt) { $months[] = $dt->format("F Y"); } print_r($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.57
8.3.50.0160.00522.05
8.3.40.0110.01119.04
8.3.30.0070.00719.25
8.3.20.0000.00720.33
8.3.10.0070.00023.66
8.3.00.0080.00019.09
8.2.180.0100.00725.92
8.2.170.0070.01118.86
8.2.160.0100.00320.39
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0080.00026.16
8.2.120.0030.01319.89
8.2.110.0040.00422.20
8.2.100.0050.00517.97
8.2.90.0040.00418.16
8.2.80.0050.00318.00
8.2.70.0050.01018.00
8.2.60.0000.00818.18
8.2.50.0000.00818.07
8.2.40.0000.00820.20
8.2.30.0040.00418.48
8.2.20.0000.00818.00
8.2.10.0000.00718.16
8.2.00.0040.00418.16
8.1.280.0090.00925.92
8.1.270.0140.00024.66
8.1.260.0040.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00623.90
8.1.230.0100.00022.23
8.1.220.0000.00817.91
8.1.210.0080.00018.84
8.1.200.0030.00617.60
8.1.190.0050.00517.61
8.1.180.0070.00218.10
8.1.170.0060.00318.76
8.1.160.0030.00518.95
8.1.150.0000.00819.14
8.1.140.0040.00417.64
8.1.130.0050.00517.98
8.1.120.0070.00017.75
8.1.110.0000.00717.66
8.1.100.0030.00617.77
8.1.90.0070.00017.70
8.1.80.0080.00017.74
8.1.70.0030.00317.75
8.1.60.0000.00817.79
8.1.50.0040.00417.73
8.1.40.0000.00817.70
8.1.30.0040.00417.85
8.1.20.0090.00017.80
8.1.10.0020.00517.69
8.1.00.0080.00017.78
8.0.300.0070.00019.90
8.0.290.0030.00517.00
8.0.280.0040.00418.62
8.0.270.0000.00717.43
8.0.260.0070.00017.45
8.0.250.0040.00417.29
8.0.240.0030.00517.24
8.0.230.0050.00317.24
8.0.220.0000.00717.13
8.0.210.0040.00417.09
8.0.200.0000.00617.14
8.0.190.0070.00317.26
8.0.180.0040.00417.23
8.0.170.0050.00517.28
8.0.160.0040.00417.16
8.0.150.0050.00517.17
8.0.140.0050.00317.16
8.0.130.0000.00613.53
8.0.120.0000.00817.06
8.0.110.0070.00017.10
8.0.100.0000.00817.19
8.0.90.0070.00017.07
8.0.80.0030.02017.13
8.0.70.0040.00417.04
8.0.60.0070.00017.19
8.0.50.0040.00417.26
8.0.30.0150.01017.33
8.0.20.0100.01017.61
8.0.10.0040.00417.33
8.0.00.0100.01017.07
7.4.330.0050.00015.27
7.4.320.0030.00316.79
7.4.300.0030.00316.70
7.4.290.0000.00716.89
7.4.280.0060.00316.73
7.4.270.0070.00016.72
7.4.260.0060.00316.65
7.4.250.0050.00216.62
7.4.240.0030.00416.79
7.4.230.0030.00316.73
7.4.220.0110.01416.72
7.4.210.0070.01016.71
7.4.200.0030.00316.67
7.4.160.0070.01316.63
7.4.150.0130.00617.40
7.4.140.0110.00717.86
7.4.130.0120.00716.77
7.4.120.0090.00816.85
7.4.110.0120.00616.85
7.4.100.0080.00816.78
7.4.90.0040.01216.80
7.4.80.0150.00619.39
7.4.70.0130.00716.93
7.4.60.0130.00716.75
7.4.50.0070.00016.75
7.4.40.0070.01716.62
7.4.30.0100.00716.72
7.4.00.0030.01315.07
7.3.330.0030.00313.33
7.3.320.0030.00313.46
7.3.310.0070.00016.37
7.3.300.0000.00716.52
7.3.290.0030.01116.49
7.3.280.0100.00616.50
7.3.270.0130.00717.40
7.3.260.0030.01316.80
7.3.250.0170.00216.71
7.3.240.0070.01016.56
7.3.230.0100.00717.00
7.3.210.0000.01716.75
7.3.200.0030.02019.39
7.3.190.0090.00816.86
7.3.180.0130.00316.55
7.3.170.0130.00716.74
7.3.160.0080.00816.85
7.2.330.0080.00817.05
7.2.320.0140.00717.03
7.2.310.0110.01116.78
7.2.300.0130.00316.62
7.2.290.0040.01016.84
7.2.60.0080.00417.09
7.2.00.0080.00819.32
7.1.200.0030.00716.00
7.1.100.0000.00918.13
7.1.70.0030.00617.38
7.1.60.0060.01619.22
7.1.50.0160.01634.67
7.1.00.0100.06722.41
7.0.200.0000.00717.03
7.0.140.0070.06321.99
7.0.60.0070.08019.99
7.0.50.0100.07717.85
7.0.40.0030.07320.14
7.0.30.0300.05020.21
7.0.20.0170.04720.21
7.0.10.0070.08720.23
7.0.00.0070.05020.11
5.6.280.0070.07021.02
5.6.210.0200.03020.65
5.6.200.0070.07318.18
5.6.190.0130.08020.68
5.6.180.0000.06320.34
5.6.170.0170.04320.51
5.6.160.0070.08720.43
5.6.150.0030.07718.25
5.6.140.0130.03718.11
5.6.130.0070.08318.18
5.6.120.0070.08321.12
5.6.110.0070.05020.88
5.6.100.0030.07321.08
5.6.90.0130.07720.96
5.6.80.0100.08320.52
5.5.350.4430.04020.43
5.5.340.0130.04318.08
5.5.330.0070.05020.40
5.5.320.0170.04720.47
5.5.310.0370.07020.34
5.5.300.0070.08017.99
5.5.290.0030.04317.98
5.5.280.0000.04720.80
5.5.270.0030.07720.88
5.5.260.0100.06320.72
5.5.250.0100.07020.70
5.5.240.0170.07020.18
5.4.450.0670.05719.47
5.4.440.0830.05319.32
5.4.430.0700.05719.52
5.4.420.0670.05319.58
5.4.410.0130.05719.30
5.4.400.0130.05319.26
5.4.390.0230.04019.00
5.4.380.0800.06318.79
5.4.370.0900.05318.80
5.4.360.0870.05018.50
5.4.350.0830.06018.82
5.4.340.0900.05018.70
5.4.320.1000.06318.51
5.4.310.0800.06318.63
5.4.300.0800.06018.75
5.4.290.0800.05318.80
5.4.280.0930.04318.69
5.4.270.0870.05018.69
5.4.260.0700.06318.75
5.4.250.0800.06318.76
5.4.240.0900.05718.79
5.4.230.0900.05718.68
5.4.220.0870.05718.51
5.4.210.1000.04718.58
5.4.200.0930.04716.77
5.4.190.0830.05318.75
5.4.180.0730.06318.75
5.4.170.1000.06318.61
5.4.160.0930.05318.70
5.4.150.0900.04718.74
5.4.140.0970.04016.31
5.4.130.1030.06016.34
5.4.120.0800.05316.22
5.4.110.0900.04716.25
5.4.100.0900.05316.46
5.4.90.0830.05316.46
5.4.80.0800.05316.29
5.4.70.0970.03716.26
5.4.60.0900.04716.19
5.4.50.0800.05316.19
5.4.40.1000.03716.26
5.4.30.0770.06316.26
5.4.20.0700.06316.25
5.4.10.0800.05016.20
5.4.00.0830.05315.81
5.3.290.0930.05314.57
5.3.280.0870.05014.58
5.3.270.0930.05314.58
5.3.260.0830.06314.64
5.3.250.0770.06014.68
5.3.240.0830.05314.50
5.3.230.1000.04014.60
5.3.220.1170.06014.62
5.3.210.1130.07014.56
5.3.200.0830.05314.54
5.3.190.0870.04714.66
5.3.180.0870.05014.56
5.3.170.0830.05314.47
5.3.160.0970.04714.47
5.3.150.0900.05314.53
5.3.140.0970.05714.52
5.3.130.0830.05714.44
5.3.120.0930.04314.50
5.3.110.0870.05014.46
5.3.100.0770.06013.99
5.3.90.0870.05314.01
5.3.80.0830.04713.98
5.3.70.0900.05013.99
5.3.60.0800.05313.90
5.3.50.0830.05013.94
5.3.40.0870.05013.95
5.3.30.0800.05013.80
5.3.20.0900.04313.66
5.3.10.1030.04713.64
5.3.00.0830.05313.72
5.2.170.0800.03311.28
5.2.160.0700.04011.12
5.2.150.0770.03711.10
5.2.140.0700.04711.06
5.2.130.0830.04711.09
5.2.120.0830.04011.16
5.2.110.0700.04011.09
5.2.100.0770.03311.09
5.2.90.0700.04011.07
5.2.80.0630.05011.14
5.2.70.0670.04311.16
5.2.60.0770.03711.00
5.2.50.0670.04711.05
5.2.40.0630.04010.96
5.2.30.0600.04010.89
5.2.20.0670.03310.92
5.2.10.0470.04710.96
5.2.00.0670.03310.87
5.1.60.0570.03010.05
5.1.50.0570.03310.09
5.1.40.0570.04010.01
5.1.30.0530.04010.45
5.1.20.0530.04010.43
5.1.10.0500.04310.20
5.1.00.0770.04010.11
5.0.50.0400.0338.62
5.0.40.0330.0378.48
5.0.30.0270.0438.36
5.0.20.0270.0308.26
5.0.10.0370.0208.21
5.0.00.0300.0408.34
4.4.90.0270.0236.91
4.4.80.0300.0206.91
4.4.70.0370.0276.91
4.4.60.0330.0176.91
4.4.50.0330.0176.91
4.4.40.0270.0376.91
4.4.30.0230.0276.91
4.4.20.0230.0276.91
4.4.10.0270.0236.91
4.4.00.0330.0336.91
4.3.110.0300.0206.91
4.3.100.0230.0236.91
4.3.90.0330.0206.91
4.3.80.0270.0406.91
4.3.70.0270.0236.91
4.3.60.0300.0176.91
4.3.50.0300.0206.91
4.3.40.0330.0306.91
4.3.30.0200.0176.91
4.3.20.0200.0176.91
4.3.10.0130.0236.91
4.3.00.0100.0237.57

preferences:
48.01 ms | 401 KiB | 5 Q