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-dd-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.3.10.0120.00916.68
7.3.00.0180.00316.53
7.2.130.0160.00316.81
7.2.120.0110.01017.07
7.2.110.0140.00516.83
7.2.100.0130.00716.68
7.2.90.0100.01016.73
7.2.80.0100.01117.08
7.2.70.0200.00616.96
7.2.60.0130.00817.20
7.2.50.0140.01016.80
7.2.40.0170.00516.66
7.2.30.0150.00516.88
7.2.20.0120.00917.02
7.2.10.0110.00916.88
7.2.00.0120.00818.07
7.1.250.0140.00915.64
7.1.200.0070.00716.16
7.1.100.0000.01218.46
7.1.70.0070.01017.31
7.1.60.0090.01219.70
7.1.50.0060.01617.34
7.1.00.0000.07722.31
7.0.200.0050.00217.03
7.0.140.0030.07021.97
7.0.80.0130.08019.95
7.0.70.0170.07719.93
7.0.60.0200.06019.93
7.0.50.0000.06320.26
7.0.40.0100.07719.95
7.0.30.0070.08320.05
7.0.20.0100.08720.19
7.0.10.0130.08019.99
7.0.00.0070.08720.17
5.6.280.0100.06721.04
5.6.230.0070.08320.56
5.6.220.0030.04320.52
5.6.210.0270.04320.66
5.6.200.0100.08721.01
5.6.190.0070.06721.03
5.6.180.0100.08021.09
5.6.170.0030.08721.05
5.6.160.0070.08321.13
5.6.150.0000.09021.11
5.6.140.0100.06321.10
5.6.130.0030.08721.08
5.6.120.0170.06720.98
5.6.110.0030.09021.07
5.6.100.0100.08021.00
5.6.90.0070.05320.93
5.6.80.0030.08020.40
5.6.70.0000.08320.30
5.6.60.0030.05320.33
5.6.50.0100.08020.43
5.6.40.0130.07720.31
5.6.30.0200.06720.37
5.6.20.0030.07320.37
5.6.10.0070.07720.28
5.6.00.0130.08020.39
5.5.370.0100.04020.51
5.5.360.0100.04720.35
5.5.350.0070.08020.36
5.5.340.0070.06320.93
5.5.330.0130.05320.77
5.5.320.0000.06020.80
5.5.310.0130.07320.80
5.5.300.0200.07320.83
5.5.290.0030.06020.89
5.5.280.0070.08320.88
5.5.270.0100.08720.63
5.5.260.0100.06020.87
5.5.250.0100.08320.69
5.5.240.0100.07720.13
5.5.230.0070.08020.24
5.5.220.0130.05320.19
5.5.210.0100.07320.27
5.5.200.0100.05020.27
5.5.190.0000.08020.27
5.5.180.0070.06020.27
5.5.160.0270.04320.25
5.5.150.0130.07020.07
5.5.140.0170.07320.14
5.5.130.0100.04720.19
5.5.120.0070.08020.07
5.5.110.0070.05720.22
5.5.100.0030.05020.15
5.5.90.0130.07020.15
5.5.80.0030.06020.18
5.5.70.0170.07720.05
5.5.60.0000.08320.08
5.5.50.0130.06720.11
5.5.40.0030.08020.11
5.5.30.0200.06020.07
5.5.20.0100.05320.07
5.5.10.0100.06319.96
5.5.00.0100.07720.04
5.4.450.0130.07319.55
5.4.440.0070.05719.30
5.4.430.0070.08019.46
5.4.420.0100.07719.44
5.4.410.0100.07719.34
5.4.400.0070.07318.91
5.4.390.0070.08018.95
5.4.380.0100.04718.94
5.4.370.0100.07718.96
5.4.360.0170.07019.03
5.4.350.0100.07718.95
5.4.340.0030.04019.08
5.4.320.0070.08019.03
5.4.310.0100.05018.81
5.4.300.0170.06318.95
5.4.290.0170.07019.14
5.4.280.0100.04719.07
5.4.270.0100.07719.02
5.4.260.0130.07019.05
5.4.250.0030.07018.77
5.4.240.0070.07718.96
5.4.230.0030.07319.04
5.4.220.0000.08318.80
5.4.210.0070.07318.96
5.4.200.0070.05719.05
5.4.190.0130.07318.93
5.4.180.0100.07019.10
5.4.170.0130.07319.04
5.4.160.0100.03318.81
5.4.150.0070.04318.81
5.4.140.0100.04016.42
5.4.130.0130.07016.38
5.4.120.0130.06316.32
5.4.110.0030.05316.31
5.4.100.0030.07716.41
5.4.90.0100.07016.26
5.4.80.0030.05016.29
5.4.70.0100.06316.30
5.4.60.0070.07316.45
5.4.50.0070.05716.28
5.4.40.0030.07316.33
5.4.30.0030.07716.23
5.4.20.0170.05316.17
5.4.10.0030.07716.23
5.4.00.0030.07015.75
5.3.290.0000.06314.49
5.3.280.0070.05714.42
5.3.270.0070.06314.59
5.3.260.0100.05714.58
5.3.250.0070.05714.57
5.3.240.0000.04314.59
5.3.230.0100.05714.45
5.3.220.0100.07314.43
5.3.210.0130.07314.42
5.3.200.0000.08314.51
5.3.190.0070.04314.55
5.3.180.0070.07714.55
5.3.170.0070.05314.51
5.3.160.0070.05714.51
5.3.150.0000.08314.44
5.3.140.0030.06014.55
5.3.130.0130.07014.39
5.3.120.0070.08014.55
5.3.110.0000.07314.54
5.3.100.0130.06313.97
5.3.90.0130.07013.98
5.3.80.0070.07313.97
5.3.70.0170.06713.88
5.3.60.0100.07313.99
5.3.50.0000.08713.88
5.3.40.0070.07013.92
5.3.30.0070.07313.87
5.3.20.0030.05313.45
5.3.10.0030.07713.63
5.3.00.0130.06713.60
5.2.170.0070.06011.13
5.2.160.0030.06311.19
5.2.150.0130.03711.11
5.2.140.0070.06311.22
5.2.130.0100.05311.02
5.2.120.0100.05310.96
5.2.110.0130.05011.08
5.2.100.0130.05010.93
5.2.90.0070.04311.14
5.2.80.0030.06311.12
5.2.70.0070.06010.91
5.2.60.0070.06010.87
5.2.50.0030.06311.04
5.2.40.0070.05710.94
5.2.30.0070.05711.01
5.2.20.0070.06010.88
5.2.10.0130.05010.71
5.2.00.0100.05710.77
5.1.60.0030.0539.87
5.1.50.0100.0509.89
5.1.40.0070.05010.04
5.1.30.0030.04010.28
5.1.20.0130.05010.43
5.1.10.0070.04310.12
5.1.00.0070.05010.11
5.0.50.0000.0438.55
5.0.40.0100.0378.47
5.0.30.0070.0478.24
5.0.20.0070.0408.26
5.0.10.0000.0308.25
5.0.00.0000.0338.25
4.4.90.0030.0377.17
4.4.80.0000.0277.17
4.4.70.0030.0377.17
4.4.60.0030.0337.17
4.4.50.0000.0337.17
4.4.40.0030.0577.17
4.4.30.0030.0337.17
4.4.20.0070.0177.17
4.4.10.0070.0177.17
4.4.00.0030.0537.17
4.3.110.0000.0277.17
4.3.100.0030.0337.17
4.3.90.0000.0277.17
4.3.80.0030.0237.17
4.3.70.0000.0177.17
4.3.60.0130.0277.17
4.3.50.0070.0337.17
4.3.40.0070.0507.17
4.3.30.0030.0237.17
4.3.20.0000.0377.17
4.3.10.0000.0377.17
4.3.00.0030.0337.17

preferences:
35.62 ms | 401 KiB | 5 Q