3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fillStart = strtotime("2019-07-23 00:15:00"); $fillEnd = strtotime("2019-09-23 13:00:00"); $gapStart = strtotime("2019-05-23 00:15:00"); $gapEnd = strtotime("2019-06-23 13:00:00"); // $wdtStart = date("l H:i:s", $gapStart); if (date("l H:i:s", $fillStart) == $wdtStart) { // already good $fillStartModified = $fillStart; } else { // move forward $fillStartModified = strtotime("next {$wdtStart}", $fillStart); } $wdtEnd = date("l H:i:s", $gapEnd); if (date("l H:i:s", $fillEnd) == $wdtEnd) { // already good $fillEndModified = $fillEnd; } else { // move backward $fillEndModified = strtotime("last {$wdtEnd}", $fillEnd); } printf("Start %s adjusted for %s = %s\n", date("l Y-m-d H:i:s", $fillStart), $wdtStart, date("l Y-m-d H:i:s", $fillStartModified)); printf("End %s adjusted for %s = %s\n", date("l Y-m-d H:i:s", $fillEnd), $wdtEnd, date("l Y-m-d H:i:s", $fillEndModified));

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.0090.00618.55
8.3.60.0110.00416.50
8.3.50.0140.00716.59
8.3.40.0120.00920.99
8.3.30.0160.00018.92
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.190.0090.00616.75
8.2.180.0110.00425.92
8.2.170.0170.00319.04
8.2.160.0000.01422.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0030.00626.35
8.2.110.0030.00722.37
8.2.100.0060.00618.05
8.2.90.0000.00819.36
8.2.80.0030.00617.97
8.2.70.0060.00317.88
8.2.60.0040.00418.16
8.2.50.0060.00218.09
8.2.40.0080.00018.22
8.2.30.0040.00418.19
8.2.20.0000.00818.19
8.2.10.0040.00419.32
8.2.00.0070.00019.30
8.1.280.0070.01425.92
8.1.270.0030.00723.99
8.1.260.0030.00528.09
8.1.250.0060.00328.09
8.1.240.0090.00021.22
8.1.230.0070.00419.13
8.1.220.0000.00817.79
8.1.210.0000.00918.77
8.1.200.0040.00417.48
8.1.190.0050.00317.48
8.1.180.0030.00518.10
8.1.170.0030.00518.63
8.1.160.0040.00418.95
8.1.150.0040.00419.05
8.1.140.0040.00419.06
8.1.130.0060.00320.22
8.1.120.0080.00017.62
8.1.110.0000.00817.63
8.1.100.0000.00817.66
8.1.90.0020.00517.61
8.1.80.0040.00417.73
8.1.70.0070.00017.64
8.1.60.0000.00817.85
8.1.50.0040.00417.68
8.1.40.0000.00817.65
8.1.30.0030.00617.87
8.1.20.0000.01017.75
8.1.10.0050.00317.56
8.1.00.0040.00417.77
8.0.300.0080.00018.77
8.0.290.0050.00316.88
8.0.280.0000.00720.30
8.0.270.0030.00318.19
8.0.260.0000.00718.53
8.0.250.0070.00017.11
8.0.240.0060.00317.15
8.0.230.0000.00617.23
8.0.220.0030.00317.13
8.0.210.0070.00017.04
8.0.200.0030.00317.22
8.0.190.0000.00717.25
8.0.180.0000.00817.16
8.0.170.0030.00617.08
8.0.160.0080.00017.06
8.0.150.0040.00417.00
8.0.140.0000.00817.01
8.0.130.0030.00313.51
8.0.120.0070.00017.09
8.0.110.0000.00817.19
8.0.100.0040.00417.00
8.0.90.0040.00417.24
8.0.80.0070.01116.96
8.0.70.0030.00517.11
8.0.60.0000.00716.98
8.0.50.0080.00017.00
8.0.30.0060.00917.33
8.0.20.0120.00917.24
8.0.10.0050.00317.18
8.0.00.0140.00716.96
7.4.330.0000.00515.55
7.4.320.0000.00616.69
7.4.300.0030.00316.75
7.4.290.0050.00216.73
7.4.280.0030.00516.85
7.4.270.0050.00216.82
7.4.260.0060.00013.40
7.4.250.0070.00016.78
7.4.240.0070.00316.71
7.4.230.0030.00316.52
7.4.220.0050.00216.84
7.4.210.0080.01016.74
7.4.200.0030.00516.75
7.4.130.0150.00516.82
7.4.120.0070.01416.75
7.4.110.0070.01416.77
7.4.100.0130.00316.60
7.4.90.0100.00716.68
7.4.80.0090.00916.87
7.4.70.0070.01016.80
7.4.60.0150.00316.77
7.4.50.0090.00916.71
7.4.40.0140.00716.81
7.4.30.0110.01116.55
7.4.20.0070.01116.40
7.4.10.0050.01316.28
7.4.00.0100.01016.74
7.3.330.0040.00416.46
7.3.320.0030.00313.30
7.3.310.0000.00716.57
7.3.300.0030.00316.42
7.3.290.0040.00416.27
7.3.280.0090.00616.45
7.3.260.0000.01716.48
7.3.230.0040.01416.62
7.3.220.0160.00316.60
7.3.210.0070.01016.68
7.3.200.0130.00316.42
7.3.190.0000.01816.36
7.3.180.0140.00416.59
7.3.170.0110.00716.63
7.3.160.0130.00716.73
7.3.150.0090.01116.35
7.3.140.0190.00016.54
7.3.130.0110.00816.64
7.3.120.0100.01016.36
7.3.110.0080.01216.64
7.3.100.0090.00916.44
7.3.90.0070.01116.55
7.3.80.0030.01516.66
7.3.70.0060.01216.55
7.3.60.0120.01216.64
7.3.50.0080.00816.53
7.3.40.0050.01316.47
7.3.30.0100.00716.71
7.3.20.0140.00316.61
7.3.10.0100.00716.34
7.3.00.0110.00616.51
7.2.330.0030.01316.96
7.2.320.0070.01416.70
7.2.310.0090.00916.55
7.2.300.0110.00716.61
7.2.290.0120.00916.67
7.2.280.0140.00816.71
7.2.270.0000.02016.59
7.2.260.0090.00916.72
7.2.250.0110.01116.89
7.2.240.0060.00916.73
7.2.230.0170.00016.87
7.2.220.0090.00916.59
7.2.210.0120.00616.86
7.2.200.0110.00716.66
7.2.190.0100.00716.76
7.2.180.0120.00816.73
7.2.170.0120.00616.73
7.2.160.0080.00816.52
7.2.150.0110.00816.75
7.2.140.0080.00816.77
7.2.130.0130.00316.58
7.2.120.0170.00716.71
7.2.110.0060.01316.85
7.2.100.0110.00716.88
7.2.90.0030.01416.57
7.2.80.0150.01316.57
7.2.70.0100.01016.64
7.2.60.0250.00616.66
7.2.50.0170.00016.76
7.2.40.0030.01316.91
7.2.30.0070.01016.88
7.2.20.0060.01216.57
7.2.10.0070.01116.69
7.2.00.0120.00616.93

preferences:
56.56 ms | 401 KiB | 5 Q