3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_hours_soiree($heure) { $soiree_start = 20; $soiree_end = 23; $jour = intval(date("j")); //$heure = intval(date("G")); $mois = intval(date("n")); if(($jour == 24 || $jour == 25 || $jour == 31) && $mois == 12) { $soiree_start = 19; } if($jour == 1 && $mois == 1) { $soiree_start = 19; } return ($heure >= $soiree_start && $heure < $soiree_end); } function check_hours_night($heure) { $night_start = 23; // $heure = $heure = intval(date("G")); return ($heure >= $night_start && heure < 8); } for($i = 0; $i <= 23; $i++) { echo $i." ".check_hours_night($i)."\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.70.0120.00316.58
8.3.60.0000.01418.55
8.3.50.0060.01221.14
8.3.40.0140.00018.79
8.3.30.0110.00718.84
8.3.20.0000.00720.34
8.3.10.0050.00323.58
8.3.00.0040.00422.21
8.2.180.0140.00716.75
8.2.170.0150.00022.96
8.2.160.0140.00020.43
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0030.00617.63
8.2.110.0060.00320.43
8.2.100.0040.00817.72
8.2.90.0040.00419.20
8.2.80.0000.00917.97
8.2.70.0090.00317.75
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00421.09
8.2.30.0000.00819.73
8.2.20.0000.00817.71
8.2.10.0040.00418.22
8.2.00.0080.00018.20
8.1.280.0170.00325.92
8.1.270.0080.00020.24
8.1.260.0040.01426.35
8.1.250.0080.00028.09
8.1.240.0000.01021.95
8.1.230.0070.00420.80
8.1.220.0040.00417.77
8.1.210.0080.00018.77
8.1.200.0030.00617.25
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0070.00318.65
8.1.160.0080.00023.82
8.1.150.0040.00418.91
8.1.140.0040.00417.46
8.1.130.0070.00017.73
8.1.120.0000.00717.39
8.1.110.0030.00617.46
8.1.100.0040.00417.46
8.1.90.0040.00417.54
8.1.80.0030.00417.46
8.1.70.0030.00317.40
8.1.60.0000.00917.51
8.1.50.0060.00317.53
8.1.40.0080.00017.45
8.1.30.0040.00417.68
8.1.20.0020.00517.64
8.1.10.0040.00417.59
8.1.00.0040.00417.58
8.0.300.0070.00018.77
8.0.290.0060.00316.75
8.0.280.0030.00318.38
8.0.270.0040.00417.24
8.0.260.0070.00017.34
8.0.250.0000.00717.04
8.0.240.0000.00716.92
8.0.230.0030.00317.00
8.0.220.0030.00317.01
8.0.210.0040.00417.01
8.0.200.0030.00517.05
8.0.190.0050.00316.92
8.0.180.0000.00716.97
8.0.170.0000.00716.91
8.0.160.0070.00017.01
8.0.150.0000.00716.90
8.0.140.0070.00016.87
8.0.130.0040.00413.36
8.0.120.0040.00416.98
8.0.110.0060.00316.84
8.0.100.0040.00417.06
8.0.90.0040.00416.76
8.0.80.0110.00416.86
8.0.70.0000.00816.91
8.0.60.0040.00416.91
8.0.50.0000.00716.81
8.0.30.0070.01117.27
8.0.20.0130.00617.40
8.0.10.0040.00417.04
8.0.00.0130.00816.73
7.4.330.0060.00015.10
7.4.320.0030.00316.67
7.4.300.0060.00016.63
7.4.290.0070.00016.53
7.4.280.0000.00816.59
7.4.270.0030.00316.60
7.4.260.0080.00316.62
7.4.250.0040.00416.48
7.4.240.0060.00116.54
7.4.230.0030.00616.60
7.4.220.0100.01016.62
7.4.210.0040.01116.69
7.4.200.0000.00716.69
7.4.160.0110.00516.59
7.4.150.0040.01817.40
7.4.140.0120.00817.86
7.4.130.0070.01016.57
7.4.120.0060.01316.56
7.4.110.0100.00716.46
7.4.100.0120.01116.61
7.4.90.0170.00716.61
7.4.80.0150.00619.39
7.4.70.0070.01116.62
7.4.60.0090.00916.56
7.4.50.0000.00816.48
7.4.40.0130.00316.61
7.4.30.0110.00616.53
7.4.00.0100.00314.87
7.3.330.0000.00713.38
7.3.320.0000.00513.22
7.3.310.0040.00416.23
7.3.300.0060.00016.24
7.3.290.0080.00816.34
7.3.280.0110.00816.41
7.3.270.0140.00317.40
7.3.260.0110.00716.43
7.3.250.0080.01116.49
7.3.240.0150.00316.39
7.3.230.0070.01016.53
7.3.210.0030.01416.46
7.3.200.0080.01419.39
7.3.190.0060.00916.41
7.3.180.0070.00716.55
7.3.170.0100.00716.41
7.3.160.0150.00316.55
7.2.330.0090.00916.76
7.2.320.0130.01016.35
7.2.310.0100.00716.45
7.2.300.0100.00616.60
7.2.290.0090.00816.46
7.2.60.0140.00316.67
7.2.00.0100.01219.31
7.1.200.0000.01515.90
7.1.100.0110.00518.06
7.1.70.0100.00617.09
7.1.60.0000.02320.03
7.1.50.0140.01017.00
7.1.00.0030.07722.49
7.0.200.0460.00314.53
7.0.110.0500.07320.09
7.0.100.0130.08719.88
7.0.90.0200.07319.86
7.0.80.0170.08719.85
7.0.70.0230.07019.89
7.0.60.0130.08020.05
7.0.50.0200.04720.41
7.0.40.0170.06720.13
7.0.30.0130.07720.25
7.0.20.0170.04320.24
7.0.10.0070.09020.18
7.0.00.0100.08320.04
5.6.260.0100.05020.61
5.6.250.0100.07020.51
5.6.240.0070.08020.56
5.6.230.0100.08020.69
5.6.220.0070.08720.67
5.6.210.0070.07720.59
5.6.200.0000.08721.04
5.6.190.0130.07321.12
5.6.180.0070.08721.16
5.6.170.0100.07721.03
5.6.160.0170.06720.94
5.6.150.0070.08020.94
5.6.140.0170.07721.02
5.6.130.0070.09021.05
5.6.120.0070.06720.99
5.6.110.0130.07721.25
5.6.100.0030.07720.93
5.6.90.0100.07720.95
5.6.80.0100.03720.54
5.6.70.0200.05720.67
5.6.60.0000.08320.46
5.6.50.0030.04320.45
5.6.40.0030.04320.31
5.6.30.0030.04020.50
5.6.20.0130.03020.55
5.6.10.0070.03720.44
5.6.00.0030.04020.28
5.5.380.0070.08320.40
5.5.370.0130.08320.58
5.5.360.0170.07020.54
5.5.350.0130.07720.43
5.5.340.0030.08721.03
5.5.330.0100.08320.83
5.5.320.0170.07721.03
5.5.310.0100.06720.73
5.5.300.0130.08020.82
5.5.290.0130.07720.70
5.5.280.0070.05020.91
5.5.270.0170.08320.69
5.5.260.0070.08320.91
5.5.250.0030.08020.84
5.5.240.0070.08020.13
5.5.230.0100.07720.29
5.5.220.0070.07720.18
5.5.210.0100.04320.41
5.5.200.0030.04020.21
5.5.190.0070.06020.40
5.5.180.0000.05320.39
5.5.160.0100.03320.25
5.5.150.0030.04320.25
5.5.140.0030.04320.32
5.5.130.0070.03720.39
5.5.120.0000.04320.32
5.5.110.0000.05020.34
5.5.100.0030.04020.11
5.5.90.0100.07020.25
5.5.80.0030.03720.28
5.5.70.0070.03720.04
5.5.60.0000.04020.16
5.5.50.0070.04720.22
5.5.40.0070.04720.10
5.5.30.0030.03720.05
5.5.20.0000.04320.13
5.5.10.0030.04020.04
5.5.00.0030.05719.96
5.4.450.0100.04719.47
5.4.440.0070.07719.55
5.4.430.0030.05019.34
5.4.420.0000.08319.35
5.4.410.0130.07319.29
5.4.400.0070.07319.03
5.4.390.0070.07319.00
5.4.380.0000.06719.14
5.4.370.0130.06319.14
5.4.360.0000.05319.16
5.4.350.0070.03719.34
5.4.340.0070.03719.18
5.4.320.0030.05018.99
5.4.310.0030.04019.33
5.4.300.0030.04319.18
5.4.290.0100.03719.05
5.4.280.0070.03319.01
5.4.270.0000.04019.01
5.4.260.0030.03719.20
5.4.250.0000.04018.95
5.4.240.0100.05319.32
5.4.230.0030.04019.13
5.4.220.0130.05719.17
5.4.210.0000.04019.02
5.4.200.0030.03719.17
5.4.190.0100.04019.15
5.4.180.0030.03719.17
5.4.170.0070.03319.22
5.4.160.0000.04019.14
5.4.150.0070.03319.16
5.4.140.0000.04016.45
5.4.130.0000.04016.36
5.4.120.0030.03716.40
5.4.110.0030.03716.52
5.4.100.0030.03716.65
5.4.90.0100.03016.61
5.4.80.0000.03716.45
5.4.70.0030.03316.50
5.4.60.0070.03316.54
5.4.50.0000.04016.23
5.4.40.0230.02016.60
5.4.30.0070.04316.23
5.4.20.0030.05716.53
5.4.10.0100.05016.53
5.4.00.0000.04715.77

preferences:
66.01 ms | 401 KiB | 5 Q