3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "2007-01-01"; $b = "2008-02-15"; $i = date("Ymi", strtotime($a)); while($i <= date("Ymi", strtotime($b))){ echo $i."\n"; if(substr($i, 4, 2) == "12") $i = (date("Y", strtotime($i."01")) + 1)."01"; else $i++; }

Abusive script

This script was stopped while abusing our resources

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.110.0100.01420.94
8.3.100.0070.01624.06
8.3.90.0100.04126.77
8.3.80.0230.00316.88
8.3.70.0270.03016.75
8.3.60.0240.03118.43
8.3.50.0160.02119.25
8.3.40.0300.03318.88
8.3.30.0300.01718.79
8.3.20.0070.01420.16
8.3.10.0130.02020.61
8.3.00.0000.02123.70
8.2.230.0210.01222.58
8.2.220.0100.02737.54
8.2.210.0120.00926.77
8.2.200.0100.02616.62
8.2.190.0170.01716.58
8.2.180.0070.03018.36
8.2.170.0250.01222.96
8.2.160.0130.01920.30
8.2.150.0140.01125.66
8.2.140.0100.01724.66
8.2.130.0130.00620.33
8.2.120.0180.01426.35
8.2.110.0140.02021.04
8.2.100.0140.02417.84
8.2.90.0100.01319.21
8.2.80.0100.01317.97
8.2.70.0100.01317.86
8.2.60.0150.00617.93
8.2.50.0160.01018.28
8.2.40.0100.01720.36
8.2.30.0060.01519.52
8.2.20.0060.01918.28
8.2.10.0070.02118.32
8.2.00.0090.01218.19
8.1.290.0130.01718.88
8.1.280.0160.03225.92
8.1.270.0140.01423.99
8.1.260.0070.01526.35
8.1.250.0130.01328.09
8.1.240.0120.01921.19
8.1.230.0160.02317.82
8.1.220.0100.01617.74
8.1.210.0130.01018.77
8.1.200.0170.00717.48
8.1.190.0060.02017.47
8.1.180.0100.01018.10
8.1.170.0070.01818.50
8.1.160.0120.00918.96
8.1.150.0040.01819.04
8.1.140.0070.01419.10
8.1.130.0140.00719.07
8.1.120.0000.02217.65
8.1.110.0090.01317.67
8.1.100.0040.02517.75
8.1.90.0030.01817.66
8.1.80.0110.01117.73
8.1.70.0100.01317.69
8.1.60.0070.01717.78
8.1.50.0130.01317.76
8.1.40.0040.01817.79
8.1.30.0100.01417.81
8.1.20.0000.02417.79
8.1.10.0070.01417.70
8.1.00.0140.01417.58
8.0.300.0130.01318.77
8.0.290.0070.01316.88
8.0.280.0060.01418.41
8.0.270.0060.01619.11
8.0.260.0150.00917.11
8.0.250.0100.01617.20
8.0.240.0070.01417.16
8.0.230.0060.01617.17
8.0.220.0160.01316.98
8.0.210.0190.00617.13
8.0.200.0060.02217.15
8.0.190.0190.01217.23
8.0.180.0030.02316.98
8.0.170.0100.01317.04
8.0.160.0070.01417.14
8.0.150.0060.01517.06
8.0.140.0090.01216.96
8.0.130.0140.01113.44
8.0.120.0070.01717.07
8.0.110.0060.01616.89
8.0.100.0070.01716.91
8.0.90.0030.01716.95
8.0.80.0030.04616.99
8.0.70.0100.01416.90
8.0.60.0070.02016.92
8.0.50.0000.02116.89
8.0.30.0330.04617.25
8.0.20.0440.05117.40
8.0.10.0070.01717.07
8.0.00.0370.07717.01
7.4.330.0060.01215.55
7.4.320.0070.01316.68
7.4.300.0070.02116.66
7.4.290.0100.01016.64
7.4.280.0180.01816.63
7.4.270.0130.01316.65
7.4.260.0030.02016.45
7.4.250.0060.01516.57
7.4.240.0080.01216.53
7.4.230.0030.01616.54
7.4.220.0030.02416.63
7.4.210.0060.04516.64
7.4.200.0100.01116.61
7.4.160.0370.04616.67
7.4.150.0510.03917.40
7.4.140.0530.05017.86
7.4.130.0490.02816.43
7.4.120.0550.05616.64
7.4.110.0330.06216.55
7.4.100.0370.07716.54
7.4.90.0600.05616.50
7.4.80.0350.12719.39
7.4.70.0350.11016.72
7.4.60.0260.05216.65
7.4.50.0100.02616.71
7.4.40.0190.04916.67
7.4.30.0280.04416.86
7.3.330.0060.01613.22
7.3.320.0110.00713.25
7.3.310.0070.01416.34
7.3.300.0110.01816.23
7.3.290.0170.05116.35
7.3.280.0300.07316.27
7.3.270.0480.08017.40
7.3.260.0370.04516.42
7.3.250.0420.06016.46
7.3.240.0430.04316.51
7.3.230.0170.04516.25
7.3.210.0240.03616.51
7.3.200.0340.05816.39
7.3.190.0330.02116.41
7.3.180.0350.02816.64
7.3.170.0200.03316.42
7.3.160.0140.05216.52
7.2.330.0340.03016.82
7.2.320.0710.07316.65
7.2.310.0110.07016.77
7.2.300.0250.04916.70
7.2.290.0340.03616.94
7.2.00.0150.02819.77
7.1.120.0090.04519.01
7.1.110.0180.06118.25
7.1.100.0200.03718.25
7.1.90.0100.04517.96
7.1.80.0170.04518.29
7.1.70.0070.03717.11
7.1.60.0320.05235.62
7.1.50.0240.04335.27
7.1.40.0320.03234.95
7.1.30.0130.06135.06
7.1.20.0190.03234.80
7.1.10.0240.05116.52
7.1.00.0150.03016.85

preferences:
138.9 ms | 403 KiB | 5 Q