3v4l.org

run code in 300+ PHP versions simultaneously
<?php $epoch = "1394031420"; $newepoch = time(); $start = new DateTime("@$epoch"); $start->modify('first day of this month'); $end = new DateTime("@$newepoch"); $end->modify('first day of next month'); $interval = DateInterval::createFromDateString('1 month'); $period = new DatePeriod($start, $interval, $end); foreach ($period as $dt) { echo $dt->format("M-d-y") . 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)
7.4.10.0100.01016.57
7.4.00.0030.01116.68
7.3.130.0100.00616.68
7.3.120.0100.00716.57
7.3.110.0070.00716.77
7.3.100.0060.00916.73
7.3.90.0090.00616.70
7.3.80.0040.01116.72
7.3.70.0070.01116.57
7.3.60.0030.01716.64
7.3.50.0070.00416.46
7.3.40.0070.00716.63
7.3.30.0070.00416.54
7.3.20.0120.00318.37
7.3.10.0020.01217.74
7.3.00.0080.00617.74
7.2.260.0100.01016.64
7.2.250.0060.00916.77
7.2.240.0110.00816.97
7.2.230.0100.00716.89
7.2.220.0000.01816.78
7.2.210.0040.01816.79
7.2.200.0070.01416.87
7.2.190.0130.00616.78
7.2.180.0080.00416.80
7.2.170.0000.01116.67
7.2.160.0000.01616.70
7.2.150.0070.00318.57
7.2.140.0030.00618.61
7.2.130.0100.00717.98
7.2.120.0020.01117.69
7.2.110.0050.00817.92
7.2.100.0020.01517.71
7.2.90.0050.01017.73
7.2.80.0050.01417.78
7.2.70.0110.01017.83
7.2.60.0100.00517.94
7.2.50.0100.00717.88
7.2.40.0100.00717.91
7.2.30.0070.00917.89
7.2.20.0050.01117.80
7.2.10.0050.01117.77
7.2.00.0080.00518.39
7.1.330.0040.01417.41
7.1.320.0140.00317.78
7.1.310.0130.00617.64
7.1.300.0080.00617.71
7.1.290.0030.01017.47
7.1.280.0090.00017.64
7.1.270.0110.00417.70
7.1.260.0080.00817.54
7.1.250.0050.01016.80
7.1.240.0070.00717.43
7.1.230.0080.01117.43
7.1.220.0080.00817.50
7.1.210.0090.00317.31
7.1.200.0050.00517.42
7.1.190.0070.00717.65
7.1.180.0030.00917.54
7.1.170.0100.00717.46
7.1.160.0090.00617.43
7.1.150.0090.00617.68
7.1.140.0060.01217.58
7.1.130.0100.00317.51
7.1.120.0030.00917.60
7.1.110.0060.00917.59
7.1.100.0050.00817.95
7.1.90.0040.00817.41
7.1.80.0030.00717.45
7.1.70.0050.01017.49
7.1.60.0090.00818.59
7.1.50.0130.00517.50
7.1.40.0000.01517.47
7.1.30.0130.00317.56
7.1.20.0070.01017.48
7.1.10.0030.00617.55
7.1.00.0070.04119.87
7.0.330.0040.01117.12
7.0.320.0040.01517.03
7.0.310.0060.00916.94
7.0.300.0030.01216.98
7.0.290.0100.00717.06
7.0.280.0030.01017.04
7.0.270.0090.00616.97
7.0.260.0070.00416.92
7.0.250.0060.00917.24
7.0.240.0040.00817.23
7.0.230.0000.01517.14
7.0.220.0070.00317.15
7.0.210.0070.00717.22
7.0.200.0050.00516.98
7.0.190.0030.01017.21
7.0.180.0030.01417.35
7.0.170.0070.00717.19
7.0.160.0090.00617.32
7.0.150.0100.00317.07
7.0.140.0020.04019.56
7.0.130.0060.00616.98
7.0.120.0030.01017.18
7.0.110.0070.01017.19
7.0.100.0040.00817.11
7.0.90.0120.00417.04
7.0.80.0120.02418.42
7.0.70.0130.04018.61
7.0.60.0120.02818.55
7.0.50.0120.02018.78
7.0.40.0070.03217.50
7.0.30.0070.03917.54
7.0.20.0040.04917.60
7.0.10.0050.03017.51
7.0.00.0050.03517.54
5.6.400.0030.01016.09
5.6.390.0070.01115.97
5.6.380.0040.01215.93
5.6.370.0080.00816.11
5.6.360.0070.00715.89
5.6.350.0060.00915.95
5.6.340.0100.00315.89
5.6.330.0070.00416.22
5.6.320.0070.01115.88
5.6.310.0060.00816.07
5.6.300.0100.00315.83
5.6.290.0000.01516.06
5.6.280.0020.04318.51
5.6.270.0060.00915.96
5.6.260.0040.01115.95
5.6.250.0060.00915.92
5.6.240.0080.00515.77
5.6.230.0100.04218.21
5.6.220.0080.03018.23
5.6.210.0070.02318.32
5.6.200.0030.02918.51
5.6.190.0100.02518.38
5.6.180.0040.04918.37
5.6.170.0050.02818.56
5.6.160.0110.04518.45
5.6.150.0090.04318.54
5.6.140.0060.04818.56
5.6.130.0080.04718.44
5.6.120.0090.02618.49
5.6.110.0040.05218.38
5.6.100.0050.04518.40
5.6.90.0090.04318.55
5.6.80.0050.04318.16
5.6.70.0090.04518.20
5.6.60.0020.03918.16
5.6.50.0030.02718.28
5.6.40.0050.02318.17
5.6.30.0040.02518.20
5.6.20.0080.02018.17
5.6.10.0090.01918.17
5.6.00.0080.02018.11
5.5.380.0040.00715.85
5.5.370.0070.03518.27
5.5.360.0070.03518.21
5.5.350.0080.03618.14
5.5.340.0130.03818.51
5.5.330.0050.04718.37
5.5.320.0080.03718.31
5.5.310.0090.04418.48
5.5.300.0150.03318.39
5.5.290.0170.03518.13
5.5.280.0100.02518.41
5.5.270.0040.04718.28
5.5.260.0030.04818.25
5.5.250.0100.04318.21
5.5.240.0070.03118.04
5.5.230.0060.03317.85
5.5.220.0090.03217.96
5.5.210.0050.02818.09
5.5.200.0080.02117.96
5.5.190.0060.02418.03
5.5.180.0060.02117.93
5.5.170.0070.01115.65
5.5.160.0100.02217.95
5.5.150.0080.02017.91
5.5.140.0020.03718.07
5.5.130.0040.03918.02
5.5.120.0100.02017.95
5.5.110.0050.02517.92
5.5.100.0110.02417.91
5.5.90.0070.01918.00
5.5.80.0040.02417.87
5.5.70.0050.03117.99
5.5.60.0060.02117.78
5.5.50.0050.02417.83
5.5.40.0070.03517.88
5.5.30.0030.02317.89
5.5.20.0080.02917.81
5.5.10.0040.02617.75
5.5.00.0100.02317.98
5.4.450.0090.02715.93
5.4.440.0050.04615.90
5.4.430.0070.03216.08
5.4.420.0050.04015.80
5.4.410.0070.04715.75
5.4.400.0150.02015.84
5.4.390.0140.03715.82
5.4.380.0080.02815.87
5.4.370.0060.03015.93
5.4.360.0050.02315.85
5.4.350.0090.02015.75
5.4.340.0080.01815.68
5.4.330.0030.00712.39
5.4.320.0060.02015.88
5.4.310.0060.02415.78
5.4.300.0030.02515.80
5.4.290.0110.02315.75
5.4.280.0040.02615.77
5.4.270.0060.02015.72
5.4.260.0050.02015.81
5.4.250.0070.01915.73
5.4.240.0030.02615.78
5.4.230.0040.03115.84
5.4.220.0050.02315.72
5.4.210.0030.02215.78
5.4.200.0090.01815.92
5.4.190.0030.02015.89
5.4.180.0030.02215.77
5.4.170.0050.02015.94
5.4.160.0080.02015.78
5.4.150.0030.02615.78
5.4.140.0080.01714.47
5.4.130.0060.01814.35
5.4.120.0030.02014.44
5.4.110.0080.01714.45
5.4.100.0090.02314.64
5.4.90.0030.02014.48
5.4.80.0020.01714.49
5.4.70.0030.02514.44
5.4.60.0020.02214.47
5.4.50.0050.02214.37
5.4.40.0050.01814.44
5.4.30.0030.02314.42
5.4.20.0060.02714.47
5.4.10.0060.03714.49
5.4.00.0070.02314.24
5.3.290.0070.02014.02
5.3.280.0020.02413.80
5.3.270.0040.02213.78
5.3.260.0030.02313.86
5.3.250.0000.02213.95
5.3.240.0070.01813.78
5.3.230.0050.02513.87
5.3.220.0050.02713.75
5.3.210.0030.02513.77
5.3.200.0080.01913.72
5.3.190.0050.02313.73
5.3.180.0040.03513.78
5.3.170.0040.02013.85
5.3.160.0080.01813.88
5.3.150.0020.02313.78
5.3.140.0030.02113.86
5.3.130.0050.02213.80
5.3.120.0110.03313.70
5.3.110.0040.04213.74
5.3.100.0050.02413.61
5.3.90.0050.03713.46
5.3.80.0030.04013.37
5.3.70.0050.02713.54
5.3.60.0030.02613.42
5.3.50.0030.02613.51
5.3.40.0190.02913.50
5.3.30.0080.03513.64
5.3.20.0070.02313.35
5.3.10.0030.02213.22
5.3.00.0050.04213.14
5.2.170.0030.03311.10
5.2.160.0000.03711.14
5.2.150.0030.06311.14
5.2.140.0070.05310.98
5.2.130.0000.03311.04
5.2.120.0100.05311.14
5.2.110.0070.02710.89
5.2.100.0100.06011.15
5.2.90.0030.04311.13
5.2.80.0030.06711.02
5.2.70.0070.06010.97
5.2.60.0030.04711.05
5.2.50.0100.04711.04
5.2.40.0030.03011.02
5.2.30.0030.04711.00
5.2.20.0000.03310.98
5.2.10.0100.05710.96
5.2.00.0130.05010.88
5.1.60.0030.05310.88
5.1.50.0100.04310.88
5.1.40.0100.05010.88
5.1.30.0100.04710.88
5.1.20.0070.03010.88
5.1.10.0070.05010.88
5.1.00.0070.03310.88
5.0.50.0000.04710.88
5.0.40.0030.03710.88
5.0.30.0000.07010.88
5.0.20.0070.03710.88
5.0.10.0000.03710.88
5.0.00.0070.04710.88
4.4.90.0030.02310.88
4.4.80.0000.02010.88
4.4.70.0000.02310.88
4.4.60.0000.03710.88
4.4.50.0000.03710.88
4.4.40.0000.04310.88
4.4.30.0030.03310.88
4.4.20.0000.04010.88
4.4.10.0000.02710.88
4.4.00.0000.03010.88
4.3.110.0070.03310.88
4.3.100.0070.03010.88
4.3.90.0030.03010.88
4.3.80.0070.04710.88
4.3.70.0000.03010.88
4.3.60.0070.02310.88
4.3.50.0000.03710.88
4.3.40.0100.04310.88
4.3.30.0000.02310.88
4.3.20.0000.03310.88
4.3.10.0000.02710.88
4.3.00.0070.03010.88

preferences:
39.18 ms | 400 KiB | 5 Q