3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = trim('November 8 - 10'); $now = new DateTime(); // Defaults to now $start = DateTime::createFromFormat('F j+', $in); // Parse month and day, ignore the rest if ($now > $start) { $start->modify("next year"); } $end = clone $start; $end->setDate( $end->format('Y'), // $start year $end->format('n'), // $start month substr($in, strrpos($in, ' ') + 1) // trailing bit of $in for day ); echo $start->format("Y-m-d"), "\n"; echo $end->format("Y-m-d");

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.0150.00618.43
8.3.50.0160.00821.21
8.3.40.0090.00918.79
8.3.30.0110.00418.57
8.3.20.0070.00020.30
8.3.10.0000.00823.61
8.3.00.0060.00319.56
8.2.180.0090.00616.75
8.2.170.0090.00622.96
8.2.160.0070.00720.30
8.2.150.0000.00825.66
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0060.00317.75
8.2.110.0050.00522.19
8.2.100.0110.00018.05
8.2.90.0050.00319.17
8.2.80.0080.00017.97
8.2.70.0100.00017.63
8.2.60.0070.00318.01
8.2.50.0040.00418.07
8.2.40.0030.00619.34
8.2.30.0000.00720.74
8.2.20.0050.00217.87
8.2.10.0000.00818.10
8.2.00.0020.00518.04
8.1.280.0070.00725.92
8.1.270.0070.01124.02
8.1.260.0140.00026.35
8.1.250.0070.00728.09
8.1.240.0030.00722.48
8.1.230.0090.00319.57
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0040.00417.47
8.1.180.0030.00518.10
8.1.170.0000.00818.80
8.1.160.0040.00421.93
8.1.150.0060.00318.95
8.1.140.0040.00417.59
8.1.130.0000.00717.76
8.1.120.0070.00017.64
8.1.110.0040.00417.52
8.1.100.0040.00417.53
8.1.90.0040.00417.67
8.1.80.0080.00017.60
8.1.70.0000.00717.65
8.1.60.0000.00917.72
8.1.50.0090.00017.63
8.1.40.0040.00417.64
8.1.30.0090.00317.75
8.1.20.0040.00417.77
8.1.10.0040.00417.67
8.1.00.0000.00817.76
8.0.300.0080.00018.90
8.0.290.0070.00016.88
8.0.280.0050.00218.43
8.0.270.0000.00717.34
8.0.260.0030.00617.24
8.0.250.0040.00417.14
8.0.240.0070.00017.02
8.0.230.0000.00717.15
8.0.220.0070.00017.00
8.0.210.0060.00317.04
8.0.200.0030.00317.04
8.0.190.0030.00517.18
8.0.180.0030.00617.14
8.0.170.0000.00817.10
8.0.160.0080.00017.11
8.0.150.0000.00817.01
8.0.140.0020.00517.03
8.0.130.0050.00013.43
8.0.120.0080.00017.06
8.0.110.0040.00417.05
8.0.100.0080.00017.10
8.0.90.0030.00417.03
8.0.80.0040.01117.12
8.0.70.0000.00817.07
8.0.60.0040.00417.15
8.0.50.0050.00317.06
8.0.30.0130.00617.35
8.0.20.0080.01317.42
8.0.10.0070.00017.01
8.0.00.0080.01017.08
7.4.330.0050.00015.20
7.4.320.0030.00316.65
7.4.300.0080.00016.65
7.4.290.0050.00316.65
7.4.280.0100.00016.70
7.4.270.0030.00316.71
7.4.260.0000.00716.71
7.4.250.0030.00316.51
7.4.240.0040.00316.71
7.4.230.0030.00316.63
7.4.220.0090.00916.66
7.4.210.0070.00716.62
7.4.200.0000.00716.54
7.4.160.0090.00616.48
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0050.01416.71
7.4.120.0100.01016.51
7.4.110.0080.00816.86
7.4.100.0140.00316.70
7.4.90.0060.01216.77
7.4.80.0100.01019.39
7.4.70.0100.00716.60
7.4.60.0120.00416.63
7.4.50.0030.00516.66
7.4.40.0100.00716.46
7.4.30.0190.00316.85
7.4.00.0030.01014.83
7.3.330.0050.00013.14
7.3.320.0030.00313.29
7.3.310.0000.00716.23
7.3.300.0030.00516.37
7.3.290.0070.00716.34
7.3.280.0130.00716.38
7.3.270.0070.01017.40
7.3.260.0040.01716.62
7.3.250.0120.00716.46
7.3.240.0060.01216.51
7.3.230.0130.00616.63
7.3.210.0120.01216.59
7.3.200.0090.00816.71
7.3.190.0180.00416.40
7.3.180.0080.00816.73
7.3.170.0110.00916.49
7.3.160.0100.00716.77
7.2.330.0030.01516.59
7.2.320.0100.00716.94
7.2.310.0100.00716.77
7.2.300.0030.01316.98
7.2.290.0070.01016.90
7.2.60.0000.01516.67
7.2.00.0000.01019.52
7.1.200.0030.01015.96
7.1.100.0030.00718.41
7.1.70.0030.01017.12
7.1.60.0160.00919.29
7.1.50.0000.01117.22
7.1.00.0000.07722.44
7.0.200.0030.00317.02
7.0.60.0130.07019.81
7.0.50.0070.03717.95
7.0.40.0000.05019.98
7.0.30.0570.04320.20
7.0.20.0300.05320.04
7.0.10.0100.05720.09
7.0.00.0100.03719.99
5.6.280.0000.04021.06
5.6.210.0030.05320.61
5.6.200.0070.03718.22
5.6.190.0070.04020.60
5.6.180.0270.04320.33
5.6.170.0170.04720.41
5.6.160.0070.08320.51
5.6.150.0000.05718.09
5.6.140.0100.04318.16
5.6.130.0130.06318.17
5.6.120.0070.06320.99
5.6.110.0130.08021.13
5.6.100.0100.07021.11
5.6.90.0030.04321.09
5.6.80.0070.04720.40
5.5.350.0170.06320.41
5.5.340.0030.06017.93
5.5.330.0030.06720.33
5.5.320.0470.06720.28
5.5.310.0270.07320.32
5.5.300.0030.04018.02
5.5.290.0070.04017.92
5.5.280.0070.05020.64
5.5.270.0000.09020.95
5.5.260.0130.07720.96
5.5.250.0070.06020.68
5.5.240.0030.06020.25
5.4.450.0700.05719.52
5.4.440.0430.06319.48
5.4.430.0600.04319.41
5.4.420.0430.05319.46
5.4.410.0530.05019.50
5.4.400.0470.05319.02
5.4.390.0530.05018.95
5.4.380.0530.05019.26
5.4.370.0570.04319.15
5.4.360.0530.05318.91
5.4.350.0530.05019.14
5.4.340.0500.05018.92
5.4.320.0700.05018.91
5.4.310.0500.04719.22
5.4.300.0500.05319.22
5.4.290.0430.05018.77
5.4.280.0400.05719.23
5.4.270.0530.04719.21
5.4.260.0500.04719.08
5.4.250.0600.06718.94
5.4.240.0500.05719.20
5.4.230.0470.05718.99
5.4.220.0530.05319.28
5.4.210.0500.04719.27
5.4.200.0400.05319.12
5.4.190.0370.05719.18
5.4.180.0430.05719.13
5.4.170.0470.05719.24
5.4.160.0430.05019.09
5.4.150.0530.04019.07
5.4.140.0470.05716.32
5.4.130.0400.05316.26
5.4.120.0600.06316.42
5.4.110.0500.04316.34
5.4.100.0430.04716.54
5.4.90.0400.04716.57
5.4.80.0430.05016.32
5.4.70.0130.03316.34
5.4.60.0300.06716.40
5.4.50.0100.06316.40
5.4.40.0230.05716.40
5.4.30.0230.06316.40
5.4.20.0370.03716.19

preferences:
54.63 ms | 401 KiB | 5 Q