3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = trim('March 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.70.0080.00818.06
8.3.60.0080.00818.27
8.3.50.0130.00621.14
8.3.40.0090.00618.64
8.3.30.0120.00318.93
8.3.20.0080.00020.04
8.3.10.0030.00523.36
8.3.00.0090.00019.48
8.2.190.0110.00416.88
8.2.180.0130.00617.00
8.2.170.0040.01122.96
8.2.160.0030.01020.44
8.2.150.0100.00624.18
8.2.140.0110.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00617.88
8.2.110.0040.00722.20
8.2.100.0080.00318.05
8.2.90.0000.00719.39
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0000.01118.15
8.2.50.0040.00418.07
8.2.40.0000.00919.28
8.2.30.0030.00320.53
8.2.20.0040.00417.85
8.2.10.0000.00918.23
8.2.00.0030.00618.08
8.1.280.0120.00325.92
8.1.270.0110.00724.10
8.1.260.0120.00426.35
8.1.250.0070.00728.09
8.1.240.0060.00322.69
8.1.230.0030.00917.66
8.1.220.0040.00417.78
8.1.210.0090.00018.77
8.1.200.0060.00317.61
8.1.190.0000.00817.24
8.1.180.0040.00418.10
8.1.170.0030.00518.90
8.1.160.0040.00422.07
8.1.150.0040.00419.00
8.1.140.0050.00317.74
8.1.130.0040.00417.73
8.1.120.0000.00717.70
8.1.110.0040.00417.59
8.1.100.0000.00717.73
8.1.90.0000.00717.75
8.1.80.0100.00017.71
8.1.70.0050.00217.59
8.1.60.0050.00317.71
8.1.50.0040.00417.73
8.1.40.0040.00417.59
8.1.30.0000.01017.77
8.1.20.0060.00317.75
8.1.10.0070.00017.78
8.1.00.0070.00017.80
8.0.300.0040.00418.81
8.0.290.0000.00717.13
8.0.280.0030.00318.57
8.0.270.0000.00717.39
8.0.260.0050.00317.27
8.0.250.0040.00417.09
8.0.240.0070.00017.21
8.0.230.0000.00717.08
8.0.220.0050.00317.05
8.0.210.0050.00217.19
8.0.200.0000.00717.14
8.0.190.0080.00017.23
8.0.180.0050.00317.18
8.0.170.0050.00317.19
8.0.160.0040.00417.19
8.0.150.0040.00417.15
8.0.140.0000.00717.13
8.0.130.0000.00613.47
8.0.120.0080.00017.12
8.0.110.0000.00817.21
8.0.100.0040.00417.14
8.0.90.0030.00317.14
8.0.80.0090.00617.03
8.0.70.0050.00217.14
8.0.60.0050.00317.21
8.0.50.0000.00817.02
8.0.30.0100.00817.14
8.0.20.0070.01517.42
8.0.10.0000.00817.33
8.0.00.0110.00616.97
7.4.330.0050.00015.22
7.4.320.0060.00016.70
7.4.300.0080.00016.69
7.4.290.0030.00616.80
7.4.280.0080.00016.70
7.4.270.0040.00416.60
7.4.260.0030.00416.61
7.4.250.0000.00716.67
7.4.240.0030.00516.78
7.4.230.0000.00716.63
7.4.220.0160.01016.70
7.4.210.0040.01016.84
7.4.200.0030.00316.77
7.4.160.0090.01316.72
7.4.150.0140.00417.40
7.4.140.0050.01217.86
7.4.130.0090.00816.64
7.4.120.0080.01016.85
7.4.110.0070.01016.77
7.4.100.0070.01016.71
7.4.90.0150.00316.74
7.4.80.0130.01019.39
7.4.70.0110.00616.90
7.4.60.0060.01316.75
7.4.50.0040.00416.77
7.4.40.0040.01116.60
7.4.30.0080.00816.75
7.4.00.0000.00815.25
7.3.330.0060.00013.19
7.3.320.0030.00313.37
7.3.310.0000.00716.39
7.3.300.0070.00016.48
7.3.290.0090.00916.40
7.3.280.0100.00916.39
7.3.270.0130.00717.40
7.3.260.0130.00316.37
7.3.250.0140.00616.46
7.3.240.0090.00916.59
7.3.230.0090.00916.61
7.3.210.0040.01516.70
7.3.200.0110.00516.45
7.3.190.0140.00416.45
7.3.180.0030.01316.61
7.3.170.0150.00616.43
7.3.160.0090.00916.75
7.2.330.0130.01316.79
7.2.320.0150.00616.90
7.2.310.0100.01017.02
7.2.300.0040.01216.83
7.2.290.0140.00717.00
7.2.60.0060.00816.87
7.2.00.0070.01019.68
7.1.200.0040.00815.96
7.1.100.0040.00718.02
7.1.70.0090.00317.44
7.1.60.0070.01719.29
7.1.50.0000.01117.15
7.1.00.0070.07322.57
7.0.200.0040.00416.87
7.0.60.0030.07719.85
7.0.50.0100.06017.95
7.0.40.0100.03719.96
7.0.30.0230.05020.12
7.0.20.0300.07720.12
7.0.10.0000.09320.33
7.0.00.0030.08320.18
5.6.280.0030.03720.99
5.6.210.0000.08320.48
5.6.200.0230.06318.13
5.6.190.0000.04320.48
5.6.180.0200.04720.27
5.6.170.0270.08320.50
5.6.160.0000.07020.47
5.6.150.0070.07018.13
5.6.140.0100.03318.21
5.6.130.0030.04318.17
5.6.120.0030.05321.09
5.6.110.0070.06020.98
5.6.100.0000.04321.05
5.6.90.0130.07721.00
5.6.80.0070.08320.48
5.5.350.0030.07020.46
5.5.340.0070.03717.89
5.5.330.0100.04720.42
5.5.320.3970.03720.16
5.5.310.0230.04720.18
5.5.300.0070.03717.98
5.5.290.0070.08317.91
5.5.280.0100.06720.96
5.5.270.0030.07320.86
5.5.260.0070.08720.84
5.5.250.0100.07720.49
5.5.240.0170.07020.10
5.4.450.0200.05319.50
5.4.440.0130.06019.64
5.4.430.0230.05319.54
5.4.420.0170.05719.42
5.4.410.0300.04719.44
5.4.400.0170.06019.19
5.4.390.0300.04718.77
5.4.380.0230.04319.28
5.4.370.0200.04719.31
5.4.360.0100.06019.32
5.4.350.0170.06019.14
5.4.340.0070.06019.31
5.4.320.0030.06719.21
5.4.310.0300.06719.19
5.4.300.0370.05318.91
5.4.290.0170.04719.14
5.4.280.0100.05718.99
5.4.270.0600.04318.99
5.4.260.0700.05718.87
5.4.250.0570.06319.03
5.4.240.0200.06019.24
5.4.230.0330.04318.86
5.4.220.0300.06319.27
5.4.210.0170.05319.09
5.4.200.0300.05019.18
5.4.190.0230.06718.86
5.4.180.0230.06019.24
5.4.170.0300.07019.27
5.4.160.0200.05719.14
5.4.150.0200.05719.24
5.4.140.0130.06016.32
5.4.130.0170.05716.27
5.4.120.0200.05016.49
5.4.110.0230.05016.54
5.4.100.0100.05716.52
5.4.90.0230.05016.36
5.4.80.0270.04016.48
5.4.70.0270.06716.49
5.4.60.0330.04716.43
5.4.50.0300.05016.04
5.4.40.0230.06316.42
5.4.30.0200.05016.49
5.4.20.0230.05016.53
5.4.10.0130.05716.43
5.4.00.0130.05315.78
5.3.290.0130.06014.51
5.3.280.0300.04714.71
5.3.270.0170.05714.48
5.3.260.0230.05014.70
5.3.250.0300.04014.59
5.3.240.0230.05314.46
5.3.230.0170.05314.61
5.3.220.0130.05314.43
5.3.210.0130.05714.58
5.3.200.0230.04714.41
5.3.190.0230.06014.41
5.3.180.0170.05014.52
5.3.170.0300.05314.54
5.3.160.0330.03714.53
5.3.150.0130.05714.54
5.3.140.0170.05714.64
5.3.130.0170.05314.38
5.3.120.0300.05714.43
5.3.110.0170.05714.39
5.3.100.0130.05713.98
5.3.90.0200.04713.97
5.3.80.0100.05714.11
5.3.70.0170.05714.00
5.3.60.0130.05313.89
5.3.50.0100.05313.93
5.3.40.0230.04713.90
5.3.30.0130.06013.76
5.3.20.0230.05313.68
5.3.10.0270.05313.42
5.3.00.0330.03313.52
5.2.170.0270.04010.95
5.2.160.0200.04011.30
5.2.150.0170.04311.20
5.2.140.0270.04711.09
5.2.130.0130.04311.12
5.2.120.0130.04311.15
5.2.110.0130.04010.93
5.2.100.0170.04011.05
5.2.90.0200.03710.95
5.2.80.0200.05310.96
5.2.70.0130.04711.18
5.2.60.0230.04710.91
5.2.50.0100.05310.91
5.2.40.0200.04711.02
5.2.30.0130.06010.82
5.2.20.0200.04710.90
5.2.10.0200.04711.02
5.2.00.0100.05310.62
5.1.60.0200.0279.89
5.1.50.0100.04010.00
5.1.40.0100.0479.98
5.1.30.0170.03010.35
5.1.20.0070.04010.39
5.1.10.0070.0409.99
5.1.00.0230.0279.96
5.0.50.0070.0308.71
5.0.40.0070.0308.36
5.0.30.0070.0478.31
5.0.20.0070.0278.36
5.0.10.0070.0308.40
5.0.00.0070.0508.39
4.4.90.0030.0236.26
4.4.80.0100.0206.28
4.4.70.0070.0236.29
4.4.60.0130.0176.29
4.4.50.0070.0206.30
4.4.40.0030.0406.32
4.4.30.0000.0276.32
4.4.20.0100.0206.32
4.4.10.0100.0276.33
4.4.00.0070.0336.34
4.3.110.0070.0276.35
4.3.100.0070.0276.36
4.3.90.0100.0276.36
4.3.80.0100.0406.37
4.3.70.0070.0306.37
4.3.60.0130.0236.38
4.3.50.0030.0276.41
4.3.40.0100.0306.43
4.3.30.0070.0206.43
4.3.20.0000.0306.43
4.3.10.0000.0276.44
4.3.00.0030.0236.46

preferences:
123.1 ms | 401 KiB | 5 Q