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 time($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)
7.2.60.0070.00417.19
7.1.200.0090.00016.13
7.1.100.0030.00918.23
7.1.70.0040.00717.41
7.1.60.0070.01719.24
7.1.50.0100.01316.94
7.1.00.0070.07322.36
7.0.200.0030.00616.82
7.0.140.0000.07322.09
7.0.100.0130.07319.90
7.0.90.0070.05019.97
7.0.80.0130.08320.12
7.0.70.0000.05319.94
7.0.60.0030.08719.93
7.0.50.0170.04320.25
7.0.40.0100.08020.08
7.0.30.0030.08720.07
7.0.20.0030.04720.17
7.0.10.0200.06320.09
7.0.00.0070.08720.05
5.6.280.0070.07020.91
5.6.250.0030.07720.63
5.6.240.0100.07020.58
5.6.230.0070.08720.66
5.6.220.0030.06720.50
5.6.210.0070.08320.66
5.6.200.0030.09321.13
5.6.190.0200.07321.08
5.6.180.0070.05021.04
5.6.170.0130.08321.14
5.6.160.0130.08321.02
5.6.150.0070.07021.08
5.6.140.0030.05020.94
5.6.130.0030.05721.10
5.6.120.0200.07721.06
5.6.110.0070.08320.93
5.6.100.0070.08321.07
5.6.90.0030.08321.13
5.6.80.0170.05320.49
5.6.70.0130.07020.40
5.6.60.0100.04020.46
5.6.50.0030.05020.35
5.6.40.0070.07720.31
5.6.30.0070.07720.46
5.6.20.0070.06720.39
5.6.10.0130.07020.41
5.6.00.0100.08020.30
5.5.380.0070.08020.42
5.5.370.0170.07720.38
5.5.360.0000.04720.44
5.5.350.0070.08320.46
5.5.340.0130.07720.81
5.5.330.0030.08020.89
5.5.320.0170.05320.80
5.5.310.0130.06720.81
5.5.300.0030.06320.75
5.5.290.0000.08320.78
5.5.280.0170.07320.78
5.5.270.0100.08320.93
5.5.260.0070.08320.91
5.5.250.0170.07020.61
5.5.240.0130.05720.17
5.5.230.0170.05720.26
5.5.220.0030.07720.13
5.5.210.0130.07320.02
5.5.200.0170.06320.24
5.5.190.0170.07720.19
5.5.180.0130.07320.19
5.5.160.0100.04020.00
5.5.150.0030.07320.18
5.5.140.0030.06020.21
5.5.130.0030.08320.16
5.5.120.0000.05020.25
5.5.110.0070.07720.18
5.5.100.0130.07020.10
5.5.90.0030.04320.09
5.5.80.0030.08020.05
5.5.70.0170.06720.14
5.5.60.0170.06720.16
5.5.50.0230.06720.06
5.5.40.0030.08320.09
5.5.30.0000.04720.05
5.5.20.0000.04320.06
5.5.10.0100.05720.13
5.5.00.0130.07319.95
5.4.450.0070.08019.45
5.4.440.0030.05019.23
5.4.430.0030.06319.41
5.4.420.0100.07019.17
5.4.410.0070.07719.04
5.4.400.0070.07719.03
5.4.390.0070.07319.04
5.4.380.0100.07719.13
5.4.370.0070.05319.09
5.4.360.0100.04319.04
5.4.350.0030.08019.21
5.4.340.0100.06719.18
5.4.320.0230.06019.12
5.4.310.0100.06719.12
5.4.300.0100.07319.13
5.4.290.0030.08319.14
5.4.280.0030.05318.95
5.4.270.0030.04319.13
5.4.260.0030.05719.16
5.4.250.0100.03719.12
5.4.240.0130.07319.12
5.4.230.0000.07319.02
5.4.220.0100.07318.90
5.4.210.0130.05319.02
5.4.200.0030.05719.04
5.4.190.0070.03719.22
5.4.180.0070.05719.23
5.4.170.0030.04719.11
5.4.160.0070.05318.88
5.4.150.0100.07319.08
5.4.140.0070.04716.25
5.4.130.0130.05716.50
5.4.120.0000.07716.46
5.4.110.0000.07316.52
5.4.100.0100.06316.32
5.4.90.0070.06316.48
5.4.80.0070.06716.51
5.4.70.0130.07016.47
5.4.60.0130.07016.49
5.4.50.0100.07316.33
5.4.40.0070.08316.53
5.4.30.0100.05716.44
5.4.20.0100.05316.50
5.4.10.0130.06716.31
5.4.00.0100.07015.94
5.3.290.0000.04314.63
5.3.280.0100.06714.63
5.3.270.0130.07314.66
5.3.260.0000.08714.67
5.3.250.0100.07714.53
5.3.240.0130.06714.54
5.3.230.0100.07014.57
5.3.220.0030.04714.55
5.3.210.0100.07314.54
5.3.200.0100.06314.64
5.3.190.0000.05014.50
5.3.180.0030.08014.49
5.3.170.0030.05014.54
5.3.160.0000.07014.57
5.3.150.0100.07314.54
5.3.140.0130.06014.66
5.3.130.0100.07714.69
5.3.120.0030.07014.50
5.3.110.0030.07714.50
5.3.100.0100.07714.04
5.3.90.0130.07014.00
5.3.80.0070.05014.02
5.3.70.0000.08014.07
5.3.60.0130.06314.04
5.3.50.0030.06714.01
5.3.40.0030.04713.88
5.3.30.0000.08014.03
5.3.20.0100.03713.78
5.3.10.0070.07013.54
5.3.00.0130.05313.56
5.2.170.0130.06011.14
5.2.160.0070.05711.27
5.2.150.0030.06311.26
5.2.140.0070.04711.24
5.2.130.0030.05011.03
5.2.120.0100.06310.96
5.2.110.0000.06011.10
5.2.100.0100.05711.01
5.2.90.0130.05310.98
5.2.80.0030.06311.16
5.2.70.0100.06011.20
5.2.60.0030.05710.96
5.2.50.0070.04311.13
5.2.40.0000.03310.91
5.2.30.0070.06011.11
5.2.20.0070.06010.82
5.2.10.0070.03310.86
5.2.00.0070.03010.81
5.1.60.0070.05010.06
5.1.50.0000.0339.88
5.1.40.0030.04010.05
5.1.30.0030.05710.40
5.1.20.0070.05010.25
5.1.10.0030.05310.07
5.1.00.0070.02710.06
5.0.50.0070.0178.65
5.0.40.0100.0178.41
5.0.30.0100.0478.23
5.0.20.0000.0238.05
5.0.10.0030.0208.00
5.0.00.0000.0338.06
4.4.90.0070.0207.18
4.4.80.0000.0277.18
4.4.70.0000.0377.18
4.4.60.0000.0377.18
4.4.50.0130.0207.18
4.4.40.0000.0537.18
4.4.30.0030.0337.18
4.4.20.0070.0307.18
4.4.10.0070.0137.18
4.4.00.0000.0307.18
4.3.110.0030.0137.18
4.3.100.0000.0177.18
4.3.90.0000.0237.18
4.3.80.0000.0277.18
4.3.70.0000.0177.18
4.3.60.0000.0177.18
4.3.50.0030.0137.18
4.3.40.0000.0237.18
4.3.30.0000.0177.18
4.3.20.0030.0137.18
4.3.10.0030.0107.18
4.3.00.0000.0137.18

preferences:
40.41 ms | 401 KiB | 5 Q