3v4l.org

run code in 300+ PHP versions simultaneously
<?php class dateCalculation { public $current_date; function __construct($date=null) { if(!empty($date)) { $this->current_date = $date; } else { $this->current_date = date('Y-m-d H:i:s'); } } public function validNextDrawDate() { $next_valid_date_time_1 = strtotime('this wednesday 20:00'); $next_valid_date_time_2 = strtotime('this saturday 20:00'); if(strtotime($this->current_date) < $next_valid_date_time_1) { // Past wednesday 20:00 of this week. $appointment_date_time = $next_valid_date_time_1; } else { $appointment_date_time = $next_valid_date_time_2; } echo date('Y-m-d H:i', $appointment_date_time); } } echo date('Y-m-d H:i:s'); $dateCalculation = new dateCalculation(date('Y-m-d H:i:s')); echo $dateCalculation->validNextDrawDate();

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.0120.00616.71
8.3.60.0120.00316.73
8.3.50.0150.00921.28
8.3.40.0120.00318.73
8.3.30.0130.00319.02
8.3.20.0050.00320.38
8.3.10.0050.00321.72
8.3.00.0050.00319.69
8.2.190.0040.01118.48
8.2.180.0080.00816.49
8.2.170.0140.00322.96
8.2.160.0090.00620.39
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00417.88
8.2.110.0030.00622.13
8.2.100.0090.00317.88
8.2.90.0070.00019.34
8.2.80.0090.00017.97
8.2.70.0060.00317.75
8.2.60.0080.00817.80
8.2.50.0060.00318.07
8.2.40.0000.00819.46
8.2.30.0030.00619.88
8.2.20.0040.00418.00
8.2.10.0040.00418.25
8.2.00.0000.00718.19
8.1.280.0100.01025.92
8.1.270.0060.01020.42
8.1.260.0000.00926.35
8.1.250.0050.00328.09
8.1.240.0060.00322.71
8.1.230.0090.00317.61
8.1.220.0060.00317.89
8.1.210.0000.00818.77
8.1.200.0000.00917.60
8.1.190.0080.00017.60
8.1.180.0040.00418.10
8.1.170.0080.00018.76
8.1.160.0000.00822.07
8.1.150.0000.01018.98
8.1.140.0040.00417.57
8.1.130.0030.00317.74
8.1.120.0040.00417.72
8.1.110.0040.00417.72
8.1.100.0040.00417.70
8.1.90.0070.00017.71
8.1.80.0000.00717.71
8.1.70.0070.00017.66
8.1.60.0030.00617.63
8.1.50.0050.00317.73
8.1.40.0050.00317.74
8.1.30.0050.00317.75
8.1.20.0000.00717.75
8.1.10.0000.00817.76
8.1.00.0000.00917.80
8.0.300.0070.00018.77
8.0.290.0040.00417.13
8.0.280.0000.00718.58
8.0.270.0000.00717.41
8.0.260.0040.00417.39
8.0.250.0000.00717.15
8.0.240.0000.00717.25
8.0.230.0040.00417.12
8.0.220.0000.00717.21
8.0.210.0040.00417.11
8.0.200.0000.00717.07
8.0.190.0050.00317.21
8.0.180.0020.00517.14
8.0.170.0000.00817.18
8.0.160.0040.00417.27
8.0.150.0040.00417.01
8.0.140.0030.00517.07
8.0.130.0030.00313.55
8.0.120.0070.00017.15
8.0.110.0000.00817.15
8.0.100.0000.00817.04
8.0.90.0070.00017.14
8.0.80.0110.00417.20
8.0.70.0040.00416.93
8.0.60.0070.00017.16
8.0.50.0080.00017.26
8.0.30.0090.00917.53
8.0.20.0130.00717.47
8.0.10.0020.00517.27
8.0.00.0090.01017.06
7.4.330.0050.00015.22
7.4.320.0030.00316.80
7.4.300.0030.00316.71
7.4.290.0000.00716.73
7.4.280.0040.00416.61
7.4.270.0000.00816.69
7.4.260.0050.00316.64
7.4.250.0000.00716.77
7.4.240.0080.00016.82
7.4.230.0030.00316.54
7.4.220.0160.01016.73
7.4.210.0070.00816.71
7.4.200.0040.00416.70
7.4.160.0160.00016.64
7.4.150.0140.00917.40
7.4.140.0110.00917.86
7.4.130.0070.01016.64
7.4.120.0080.00916.83
7.4.110.0180.00616.68
7.4.100.0130.00416.66
7.4.90.0070.01116.69
7.4.80.0090.00919.39
7.4.70.0070.01016.77
7.4.60.0080.00816.87
7.4.50.0000.00816.45
7.4.40.0090.00916.76
7.4.30.0130.00316.73
7.4.00.0000.01415.38
7.3.330.0050.00313.50
7.3.320.0000.00513.57
7.3.310.0020.00516.55
7.3.300.0030.00316.52
7.3.290.0000.00716.46
7.3.280.0050.01016.46
7.3.270.0130.00617.40
7.3.260.0000.01716.59
7.3.250.0090.01016.63
7.3.240.0210.00016.84
7.3.230.0070.01716.75
7.3.210.0140.00316.76
7.3.200.0100.01016.79
7.3.190.0050.01116.71
7.3.180.0130.00716.54
7.3.170.0130.01016.76
7.3.160.0090.00616.71
7.3.120.0070.01015.07
7.3.110.0030.01314.80
7.3.100.0060.00315.20
7.3.90.0110.00314.94
7.3.80.0040.01114.88
7.3.70.0080.00814.96
7.3.60.0060.01015.07
7.3.50.0030.01214.85
7.3.40.0030.01015.18
7.3.30.0070.00715.05
7.3.20.0070.01016.78
7.3.10.0150.00216.50
7.3.00.0090.01016.76
7.2.330.0100.00717.09
7.2.320.0180.00416.76
7.2.310.0110.00617.06
7.2.300.0090.01316.63
7.2.290.0130.00317.04
7.2.240.0070.00715.49
7.2.230.0070.01115.32
7.2.220.0100.00315.26
7.2.210.0000.01115.55
7.2.200.0060.00615.20
7.2.190.0100.00715.43
7.2.180.0070.01015.30
7.2.170.0000.01415.27
7.2.160.0070.00315.12
7.2.150.0060.00616.90
7.2.140.0080.00417.21
7.2.130.0030.01017.03
7.2.120.0070.01016.87
7.2.110.0050.01216.91
7.2.100.0040.00917.11
7.2.90.0090.00817.03
7.2.80.0080.00817.10
7.2.70.0110.00817.15
7.2.60.0100.00717.00
7.2.50.0090.00616.92
7.2.40.0090.00717.17
7.2.30.0060.01317.04
7.2.20.0050.01017.05
7.2.10.0120.00816.84
7.2.00.0110.00517.21
7.1.330.0040.00816.13
7.1.320.0030.01315.94
7.1.310.0000.01616.16
7.1.300.0000.01615.99
7.1.290.0100.00716.09
7.1.280.0060.00916.11
7.1.270.0030.01016.07
7.1.260.0000.01416.00
7.1.250.0020.00915.81
7.1.70.0040.00417.51
7.1.60.0130.01020.03
7.1.50.0100.01317.36
7.1.00.0030.07722.54
7.0.200.0570.00314.64
7.0.110.0070.08020.02
7.0.100.0170.03320.06
7.0.90.0070.04319.89
7.0.80.0100.08019.95
7.0.70.0170.07019.96
7.0.60.0100.07319.87
7.0.50.0170.07320.19
7.0.40.0100.08320.25
7.0.30.0100.08320.19
7.0.20.0100.08720.05
7.0.10.0100.08020.15
7.0.00.0070.08020.02
5.6.280.0000.03320.92
5.6.260.0100.04720.54
5.6.250.0100.07720.55
5.6.240.0030.09020.64
5.6.230.0130.08320.64
5.6.220.0130.05320.56
5.6.210.0130.05020.75
5.6.200.0130.07321.15
5.6.190.0070.08320.92
5.6.180.0030.07321.09
5.6.170.0070.08021.07
5.6.160.0070.05321.20
5.6.150.0130.06321.22
5.6.140.0100.08021.08
5.6.130.0100.07321.12
5.6.120.0100.07320.99
5.6.110.0130.08321.22
5.6.100.0070.06020.93
5.6.90.0170.06020.97
5.6.80.0030.04720.44
5.6.70.0130.07320.64
5.6.60.0170.07020.56
5.6.50.0070.08720.54
5.6.40.0170.07720.34
5.6.30.0100.07720.46
5.6.20.0070.08320.30
5.6.10.0130.07720.50
5.6.00.0170.06720.30
5.5.380.0000.09320.30
5.5.370.0070.08720.36
5.5.360.0230.06720.41
5.5.350.0100.08320.38
5.5.340.0130.06720.70
5.5.330.0100.08320.98
5.5.320.0100.06721.03
5.5.310.0130.08020.84
5.5.300.0130.07721.02
5.5.290.0100.07720.98
5.5.280.0130.07020.87
5.5.270.0000.05720.91
5.5.260.0100.07720.74
5.5.250.0130.07320.83
5.5.240.0130.07320.43
5.5.230.0170.06720.27
5.5.220.0030.05320.33
5.5.210.0100.06720.20
5.5.200.0100.07020.10
5.5.190.0100.07320.37
5.5.180.0170.06320.17
5.5.160.0170.06720.30
5.5.150.0030.07720.09
5.5.140.0100.07720.22
5.5.130.0070.07720.32
5.5.120.0070.08020.16
5.5.110.0070.07720.37
5.5.100.0130.07719.98
5.5.90.0130.07020.19
5.5.80.0070.08020.08
5.5.70.0130.05020.25
5.5.60.0100.07320.04
5.5.50.0100.07019.99
5.5.40.0070.07720.26
5.5.30.0130.07720.26
5.5.20.0070.07720.19
5.5.10.0100.07720.17
5.5.00.0100.07720.17
5.4.450.0100.08319.49
5.4.440.0070.05319.33
5.4.430.0100.07319.33
5.4.420.0100.07019.30
5.4.410.0030.05719.53
5.4.400.0170.06718.95
5.4.390.0070.06019.19
5.4.380.0100.08019.25
5.4.370.0130.07319.21
5.4.360.0100.06319.18
5.4.350.0170.06319.09
5.4.340.0070.07319.01
5.4.320.0130.07319.00
5.4.310.0070.07319.20
5.4.300.0130.08319.24
5.4.290.0070.07319.03
5.4.280.0070.08018.98
5.4.270.0100.04319.00
5.4.260.0070.06719.17
5.4.250.0100.07319.00
5.4.240.0100.06719.22
5.4.230.0000.05319.08
5.4.220.0130.07019.16
5.4.210.0100.05719.09
5.4.200.0070.06319.30
5.4.190.0070.07019.31
5.4.180.0100.06019.30
5.4.170.0000.06019.00
5.4.160.0100.05319.15
5.4.150.0030.04718.93
5.4.140.0100.07016.35
5.4.130.0070.08016.62
5.4.120.0070.07716.32
5.4.110.0070.07316.46
5.4.100.0070.07016.54
5.4.90.0100.07016.37
5.4.80.0130.06316.58
5.4.70.0070.07716.59
5.4.60.0030.07316.29
5.4.50.0070.07316.56
5.4.40.0030.07316.52
5.4.30.0070.07716.44
5.4.20.0070.03716.43
5.4.10.0000.06716.44
5.4.00.0100.06015.70

preferences:
29.8 ms | 401 KiB | 5 Q