3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_weekday($date) { $week_day = date('w',$date); if ($week_day == 0) return strtotime("+1 day",$date); elseif ($week_day == 6) return strtotime("+2 day", $date); return $date; } for($i = 1; $i < 10; $i++) { $today = strtotime("+$i days"); $quote_for = get_weekday($today); $diff = ceil(($quote_for - $today)/86400); // difference in days echo "On " . date('l \t\h\e jS',$today) . " the shipping quote will be for " . date('l \t\h\e jS', $quote_for) . " which is " . abs($diff) . " days " . ($diff <0?"before":"after") . " today. " . date('Y-m-d',$today) . " - " . date('Y-m-d',$quote_for) . "\n"; }

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.0170.00318.55
8.3.50.0100.00822.05
8.3.40.0110.00719.02
8.3.30.0000.01518.87
8.3.20.0110.00720.34
8.3.10.0040.00421.92
8.3.00.0080.00022.44
8.2.180.0100.01016.75
8.2.170.0110.00622.96
8.2.160.0030.01021.07
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.61
8.2.110.0030.00622.42
8.2.100.0060.00617.91
8.2.90.0050.00319.36
8.2.80.0000.00818.05
8.2.70.0050.00317.75
8.2.60.0000.00818.05
8.2.50.0030.00518.07
8.2.40.0030.00518.41
8.2.30.0090.00018.23
8.2.20.0030.00517.83
8.2.10.0040.00418.07
8.2.00.0000.00818.07
8.1.280.0110.00425.92
8.1.270.0080.00023.96
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.71
8.1.230.0070.00419.21
8.1.220.0040.00417.89
8.1.210.0000.00818.77
8.1.200.0000.01017.48
8.1.190.0040.00417.63
8.1.180.0030.00518.10
8.1.170.0040.00418.71
8.1.160.0030.00322.14
8.1.150.0040.00418.80
8.1.140.0000.00817.67
8.1.130.0000.00817.96
8.1.120.0050.00317.60
8.1.110.0060.00317.61
8.1.100.0000.00817.63
8.1.90.0080.00017.75
8.1.80.0040.00417.68
8.1.70.0030.00317.75
8.1.60.0030.00617.80
8.1.50.0080.00017.60
8.1.40.0000.00817.63
8.1.30.0030.00617.71
8.1.20.0000.00817.83
8.1.10.0080.00017.74
8.1.00.0040.00417.74
8.0.300.0070.00018.77
8.0.290.0080.00017.15
8.0.280.0030.00518.60
8.0.270.0000.00717.39
8.0.260.0070.00017.00
8.0.250.0030.00317.15
8.0.240.0040.00417.22
8.0.230.0030.00317.23
8.0.220.0030.00517.21
8.0.210.0080.00017.23
8.0.200.0040.00417.25
8.0.190.0080.00017.22
8.0.180.0040.00417.20
8.0.170.0030.00517.11
8.0.160.0060.00317.24
8.0.150.0030.00517.10
8.0.140.0000.00717.04
8.0.130.0000.00713.53
8.0.120.0000.00717.14
8.0.110.0070.00017.22
8.0.100.0000.00817.23
8.0.90.0080.00017.19
8.0.80.0030.01417.13
8.0.70.0040.00417.08
8.0.60.0070.00017.00
8.0.50.0030.00517.05
8.0.30.0130.00617.30
8.0.20.0140.00617.53
8.0.10.0000.00717.33
8.0.00.0060.01116.93
7.4.330.0000.00515.21
7.4.320.0030.00316.70
7.4.300.0000.00616.64
7.4.290.0000.00816.80
7.4.280.0070.00016.73
7.4.270.0000.00816.85
7.4.260.0000.00716.63
7.4.250.0000.00716.83
7.4.240.0030.00416.77
7.4.230.0000.00716.90
7.4.220.0060.01216.71
7.4.210.0090.00816.70
7.4.200.0000.00816.90
7.4.190.0040.00416.96
7.4.160.0080.00816.77
7.4.150.0120.00917.40
7.4.140.0090.00917.86
7.4.130.0070.01016.76
7.4.120.0090.00916.85
7.4.110.0090.00916.75
7.4.100.0120.00916.84
7.4.90.0170.00716.91
7.4.80.0080.01219.39
7.4.70.0070.01016.63
7.4.60.0060.01016.88
7.4.50.0040.00416.74
7.4.40.0040.01222.77
7.4.30.0080.00816.95
7.4.00.0030.00615.46
7.3.330.0030.00313.63
7.3.320.0030.00313.58
7.3.310.0040.00416.44
7.3.300.0000.00716.58
7.3.290.0100.01016.48
7.3.280.0100.00716.56
7.3.270.0120.00617.40
7.3.260.0100.01416.88
7.3.250.0070.01316.67
7.3.240.0130.00316.87
7.3.230.0060.01216.58
7.3.210.0000.01916.61
7.3.200.0090.01219.39
7.3.190.0100.00716.68
7.3.180.0040.01316.82
7.3.170.0040.01416.59
7.3.160.0160.00016.56
7.3.120.0090.00615.18
7.2.330.0100.00716.95
7.2.320.0110.00617.08
7.2.310.0030.01416.99
7.2.300.0090.00916.94
7.2.290.0120.00417.04
7.2.60.0080.00417.25
7.2.00.0040.00819.77
7.1.200.0000.01415.93
7.1.100.0030.01218.43
7.1.70.0070.00717.46
7.1.60.0130.01019.82
7.1.50.0060.01616.96
7.1.00.0000.08022.57
7.0.200.0130.00316.98
7.0.140.0070.07021.98
7.0.80.0130.06320.01
7.0.70.0870.08019.90
7.0.60.0770.07719.98
7.0.50.0470.04320.39
7.0.40.0070.07020.07
7.0.30.0100.04720.10
7.0.20.0030.08720.08
7.0.10.0230.04320.10
7.0.00.0070.09020.09
5.6.280.0000.07720.79
5.6.230.0070.05320.50
5.6.220.0000.04720.61
5.6.210.0100.08320.46
5.6.200.0200.06320.97
5.6.190.0070.04321.03
5.6.180.0070.08021.08
5.6.170.0100.08321.05
5.6.160.0030.09021.04
5.6.150.0070.05721.06
5.6.140.0130.07721.02
5.6.130.0070.04720.96
5.6.120.0130.06021.01
5.6.110.0030.09021.01
5.6.100.0000.04721.03
5.6.90.0030.09021.11
5.6.80.0200.05020.35
5.6.70.0170.06320.55
5.6.60.0030.05020.34
5.6.50.0130.07720.43
5.6.40.0030.06020.40
5.6.30.0030.05320.45
5.6.20.0030.08020.37
5.6.10.0070.08320.36
5.6.00.0070.06020.30
5.5.370.0000.05320.55
5.5.360.0100.04720.39
5.5.350.0130.07320.45
5.5.340.0100.07020.93
5.5.330.0070.07020.89
5.5.320.0030.06720.78
5.5.310.0100.07020.91
5.5.300.0070.08320.89
5.5.290.0100.07320.87
5.5.280.0070.06020.77
5.5.270.0200.07720.77
5.5.260.0070.09020.77
5.5.250.0000.09020.73
5.5.240.0100.08320.27
5.5.230.0070.06020.31
5.5.220.0070.04720.21
5.5.210.0100.03720.29
5.5.200.0130.07720.26
5.5.190.0130.07320.25
5.5.180.0100.04320.22
5.5.160.0170.07020.15
5.5.150.0030.06720.14
5.5.140.0200.07020.08
5.5.130.0070.03720.25
5.5.120.0070.03719.99
5.5.110.0100.05320.11
5.5.100.0030.06719.96
5.5.90.0030.04319.98
5.5.80.0030.04019.98
5.5.70.0000.04319.95
5.5.60.0070.03320.06
5.5.50.0100.07720.10
5.5.40.0030.04020.07
5.5.30.0030.03320.05
5.5.20.0100.07020.09
5.5.10.0070.07320.06
5.5.00.0030.03319.97
5.4.450.0030.05019.46
5.4.440.0030.04319.35
5.4.430.0030.05019.45
5.4.420.0000.04719.55
5.4.410.0030.06019.42
5.4.400.0070.05318.85
5.4.390.0030.08019.13
5.4.380.0070.07319.21
5.4.370.0070.04018.91
5.4.360.0070.07019.03
5.4.350.0070.07019.09
5.4.340.0070.05318.85
5.4.320.0100.07719.03
5.4.310.0030.04319.03
5.4.300.0070.04019.23
5.4.290.0070.03319.10
5.4.280.0100.03718.87
5.4.270.0030.06718.84
5.4.260.0030.03719.02
5.4.250.0030.06719.02
5.4.240.0030.03718.86
5.4.230.0000.05018.87
5.4.220.0030.04018.92
5.4.210.0030.06319.00
5.4.200.0000.04019.04
5.4.190.0070.03018.89
5.4.180.0130.05319.03
5.4.170.0070.03019.04
5.4.160.0030.07719.14
5.4.150.0000.07019.14
5.4.140.0000.04016.53
5.4.130.0100.02716.51
5.4.120.0030.03016.36
5.4.110.0070.03016.49
5.4.100.0030.03316.56
5.4.90.0070.03316.39
5.4.80.0000.03716.39
5.4.70.0030.03716.36
5.4.60.0070.03316.39
5.4.50.0000.03716.48
5.4.40.0000.03316.43
5.4.30.0000.03716.30
5.4.20.0030.03316.47
5.4.10.0030.03716.40
5.4.00.0000.03715.88
5.3.290.0000.08314.80
5.3.280.0000.05714.56
5.3.270.0070.06314.57
5.3.260.0030.03314.75
5.3.250.0030.03314.63
5.3.240.0100.06014.68
5.3.230.0030.03314.58
5.3.220.0070.04714.62
5.3.210.0100.02714.63
5.3.200.0070.03014.55
5.3.190.0000.04014.62
5.3.180.0000.04314.51
5.3.170.0000.04714.52
5.3.160.0000.04014.70
5.3.150.0070.03714.55
5.3.140.0070.03314.56
5.3.130.0030.03714.69
5.3.120.0170.02714.55
5.3.110.0030.03714.66
5.3.100.0030.03714.07
5.3.90.0100.03014.13
5.3.80.0030.03714.10
5.3.70.0030.06714.02
5.3.60.0000.04013.98
5.3.50.0030.03714.01
5.3.40.0030.06714.08
5.3.30.0070.06313.96
5.3.20.0030.03013.80
5.3.10.0030.05313.63
5.3.00.0030.03313.52
5.2.170.0000.03310.96
5.2.160.0030.02311.05
5.2.150.0000.03311.03
5.2.140.0030.02711.04
5.2.130.0030.03311.16
5.2.120.0000.02711.16
5.2.110.0030.02711.19
5.2.100.0000.03311.19
5.2.90.0030.02711.00
5.2.80.0000.04311.16
5.2.70.0030.03311.21
5.2.60.0030.04311.06
5.2.50.0030.06310.94
5.2.40.0070.05010.89
5.2.30.0030.06311.08
5.2.20.0030.06310.86
5.2.10.0000.05010.85
5.2.00.0100.05710.73
5.1.60.0030.04010.07
5.1.50.0070.0509.83
5.1.40.0100.03710.07
5.1.30.0070.05710.48
5.1.20.0070.05310.21
5.1.10.0100.05310.05
5.1.00.0030.05710.06
5.0.50.0000.0438.61
5.0.40.0070.0208.43
5.0.30.0100.0438.08
5.0.20.0000.0478.30
5.0.10.0030.0438.18
5.0.00.0030.0508.01
4.4.90.0000.0137.28
4.4.80.0030.0307.28
4.4.70.0130.0237.28
4.4.60.0030.0337.28
4.4.50.0070.0307.28
4.4.40.0000.0377.28
4.4.30.0000.0377.28
4.4.20.0030.0277.28
4.4.10.0030.0377.28
4.4.00.0100.0477.28
4.3.110.0000.0377.28
4.3.100.0030.0307.28
4.3.90.0000.0337.28
4.3.80.0000.0507.28
4.3.70.0000.0377.28
4.3.60.0030.0337.28
4.3.50.0000.0337.28
4.3.40.0100.0237.28
4.3.30.0070.0307.28
4.3.20.0000.0377.28
4.3.10.0000.0377.28
4.3.00.0030.0337.28

preferences:
46.98 ms | 401 KiB | 5 Q