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 = 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.60.0070.00716.50
8.3.50.0170.00221.07
8.3.40.0040.01119.02
8.3.30.0090.00618.75
8.3.20.0000.00820.04
8.3.10.0000.00723.53
8.3.00.0000.00822.26
8.2.180.0140.00718.41
8.2.170.0090.00922.96
8.2.160.0000.01419.32
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00917.63
8.2.110.0030.00621.10
8.2.100.0080.00317.97
8.2.90.0000.00818.22
8.2.80.0080.00018.23
8.2.70.0040.00418.03
8.2.60.0000.00817.80
8.2.50.0030.00618.10
8.2.40.0040.00420.59
8.2.30.0040.00418.02
8.2.20.0040.00417.80
8.2.10.0040.00418.07
8.2.00.0040.00418.14
8.1.280.0030.01925.92
8.1.270.0040.00420.33
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0040.00422.48
8.1.230.0080.00322.75
8.1.220.0040.00417.76
8.1.210.0030.00818.77
8.1.200.0000.00817.35
8.1.190.0090.00017.35
8.1.180.0050.00318.10
8.1.170.0000.00818.64
8.1.160.0000.00722.12
8.1.150.0040.00418.84
8.1.140.0040.00417.49
8.1.130.0000.00717.73
8.1.120.0080.00017.39
8.1.110.0070.00317.45
8.1.100.0000.00717.48
8.1.90.0070.00317.41
8.1.80.0040.00417.47
8.1.70.0030.00317.51
8.1.60.0090.00317.54
8.1.50.0050.00317.43
8.1.40.0000.00817.56
8.1.30.0030.00617.68
8.1.20.0050.00217.68
8.1.10.0040.00417.66
8.1.00.0050.00317.50
8.0.300.0000.00719.98
8.0.290.0030.00616.75
8.0.280.0040.00418.42
8.0.270.0040.00417.30
8.0.260.0000.00617.16
8.0.250.0050.00316.95
8.0.240.0060.00017.04
8.0.230.0050.00316.90
8.0.220.0070.00016.91
8.0.210.0000.00717.02
8.0.200.0080.00017.06
8.0.190.0040.00416.91
8.0.180.0040.00416.96
8.0.170.0040.00416.98
8.0.160.0070.00017.03
8.0.150.0000.00816.95
8.0.140.0030.00516.95
8.0.130.0030.00513.46
8.0.120.0050.00316.92
8.0.110.0030.00517.05
8.0.100.0000.00817.00
8.0.90.0000.00717.04
8.0.80.0110.00617.04
8.0.70.0050.00216.98
8.0.60.0000.00716.83
8.0.50.0000.00716.97
8.0.30.0100.00717.11
8.0.20.0100.00817.40
8.0.10.0050.00216.95
8.0.00.0100.00716.91
7.4.330.0050.00015.10
7.4.320.0030.00316.61
7.4.300.0000.00616.44
7.4.290.0070.00016.52
7.4.280.0080.00016.66
7.4.270.0000.00716.61
7.4.260.0000.00816.63
7.4.250.0000.00816.51
7.4.240.0030.00416.55
7.4.230.0040.00416.68
7.4.220.0100.01416.63
7.4.210.0070.01416.63
7.4.200.0030.00316.50
7.4.160.0130.00316.52
7.4.150.0100.00717.40
7.4.140.0130.00517.86
7.4.130.0080.00916.59
7.4.120.0090.00916.59
7.4.110.0030.01316.70
7.4.100.0140.01116.50
7.4.90.0140.00316.60
7.4.80.0060.01219.39
7.4.70.0040.01316.46
7.4.60.0150.00416.57
7.4.50.0040.00416.44
7.4.40.0080.00816.50
7.4.30.0060.01016.50
7.4.00.0030.01014.91
7.3.330.0000.00713.35
7.3.320.0000.00613.34
7.3.310.0030.00616.27
7.3.300.0030.00316.25
7.3.290.0050.01116.32
7.3.280.0070.00916.40
7.3.270.0030.01417.40
7.3.260.0100.00716.56
7.3.250.0140.00516.51
7.3.240.0070.01016.38
7.3.230.0040.01316.50
7.3.210.0130.00316.45
7.3.200.0020.02019.39
7.3.190.0100.00716.43
7.3.180.0060.01116.65
7.3.170.0130.00316.64
7.3.160.0120.00916.58
7.2.330.0090.01016.65
7.2.320.0140.00416.86
7.2.310.0080.00816.75
7.2.300.0050.01316.77
7.2.290.0090.01216.40
7.2.60.0070.01016.84
7.2.00.0180.01519.03
7.1.200.0100.00315.55
7.1.100.0100.00718.19
7.1.70.0100.01017.10
7.1.60.0140.01120.03
7.1.50.0130.01016.99
7.1.00.0000.08022.44
7.0.200.0600.00414.53
7.0.100.0130.05719.90
7.0.90.0200.07719.85
7.0.80.0130.08019.82
7.0.70.0170.08019.81
7.0.60.0230.07319.98
7.0.50.0100.09020.19
7.0.40.0100.08020.07
7.0.30.0100.07720.04
7.0.20.0200.07020.07
7.0.10.0200.07019.89
7.0.00.0100.09019.97
5.6.280.0000.07321.13
5.6.250.0130.06020.44
5.6.240.0030.07320.68
5.6.230.0100.08020.48
5.6.220.0100.08320.61
5.6.210.0070.08320.39
5.6.200.0100.06721.06
5.6.190.0130.07021.05
5.6.180.0030.08721.04
5.6.170.0000.05721.00
5.6.160.0100.05721.09
5.6.150.0100.05720.99
5.6.140.0170.07320.97
5.6.130.0000.06321.02
5.6.120.0030.05721.12
5.6.110.0100.04721.03
5.6.100.0170.07021.02
5.6.90.0000.08720.99
5.6.80.0100.07320.42
5.6.70.0030.05320.34
5.6.60.0030.07020.34
5.6.50.0100.08320.51
5.6.40.0100.07720.34
5.6.30.0130.04720.35
5.6.20.0030.04320.32
5.6.10.0070.08020.35
5.6.00.0170.07020.37
5.5.380.0100.06720.50
5.5.370.0070.07320.50
5.5.360.0170.07720.37
5.5.350.0070.05320.36
5.5.340.0100.09020.84
5.5.330.0100.07720.77
5.5.320.0100.07320.86
5.5.310.0030.09020.75
5.5.300.0070.06020.82
5.5.290.0030.06720.88
5.5.280.0070.09320.84
5.5.270.0100.08720.83
5.5.260.0070.08720.86
5.5.250.0170.04720.62
5.5.240.0030.04720.27
5.5.230.0070.06320.16
5.5.220.0070.06020.09
5.5.210.0070.07320.26
5.5.200.0000.06019.93
5.5.190.0100.05720.11
5.5.180.0100.08320.23
5.5.160.0070.05320.21
5.5.150.0100.07320.19
5.5.140.0070.05020.07
5.5.130.0070.07720.20
5.5.120.0030.06020.17
5.5.110.0070.05020.10
5.5.100.0100.07720.13
5.5.90.0070.04720.10
5.5.80.0030.05719.93
5.5.70.0070.08020.09
5.5.60.0170.05720.11
5.5.50.0070.04720.01
5.5.40.0130.07320.07
5.5.30.0030.07320.03
5.5.20.0070.04720.00
5.5.10.0030.07019.93
5.5.00.0070.07320.08
5.4.450.0130.06019.52
5.4.440.0130.04319.15
5.4.430.0030.07719.50
5.4.420.0030.08719.39
5.4.410.0070.07319.32
5.4.400.0030.04719.12
5.4.390.0070.08319.01
5.4.380.0100.08018.90
5.4.370.0170.06319.21
5.4.360.0130.07019.21
5.4.350.0070.06319.21
5.4.340.0100.07319.04
5.4.320.0000.08319.12
5.4.310.0070.08019.13
5.4.300.0130.03019.12
5.4.290.0200.07719.12
5.4.280.0170.06719.04
5.4.270.0130.06719.11
5.4.260.0130.07018.90
5.4.250.0170.07319.20
5.4.240.0070.07019.11
5.4.230.0170.06719.08
5.4.220.0130.07019.02
5.4.210.0000.05019.11
5.4.200.0130.05019.04
5.4.190.0070.05719.05
5.4.180.0170.06019.23
5.4.170.0170.06718.89
5.4.160.0170.06319.01
5.4.150.0070.07319.01
5.4.140.0070.05316.41
5.4.130.0030.06316.37
5.4.120.0070.05716.30
5.4.110.0070.07016.55
5.4.100.0000.06716.34
5.4.90.0100.07016.52
5.4.80.0130.04316.56
5.4.70.0070.07016.52
5.4.60.0070.06716.45
5.4.50.0100.06716.26
5.4.40.0100.06016.35
5.4.30.0070.07316.31
5.4.20.0070.06716.36
5.4.10.0100.06316.46
5.4.00.0130.06715.80

preferences:
60.05 ms | 401 KiB | 5 Q