3v4l.org

run code in 300+ PHP versions simultaneously
<?php function tipoHorario($hora, $inicioMatutino, $inicioVespertino, $finMatutino, $finVespertino){ $horaUTC = strtotime($hora); if($horaUTC >= strtotime($inicioMatutino) && $horaUTC < strtotime($finMatutino)) return "Matutino"; else if($horaUTC >= strtotime($finMatutino) && $horaUTC < strtotime($inicioVespertino) ) return "Descanso matutino"; else if($horaUTC >= strtotime($inicioVespertino) && $horaUTC < strtotime($finVespertino)) return "Vespertino"; else return "Descanso vespertino"; } function casoEspecialMatutino($hora, $finMatutino){ $previoFinMatutino = date("H:i", strtotime($previoFinMatutino . " -30 minutes")); echo $previoFinMatutino; } function casoEspecialVespertino($hora, $finVespertino){ } function checktime($fechaHora, $minutosTolerancia){ $fecha = date("Y-m-d", strtotime($fechaHora)); $horaMinuto = date("H:i", strtotime($fechaHora)); $noDia = date("N", strtotime($fechaHora)); $horaInicioMatutino = "09:00"; $horaFinMatutino = "15:00"; $horaInicioVespertino = "16:30"; $horaFinVespertino = "18:30"; /*echo "fecha: " . $fecha . "\nhoraMinuto: " . $horaMinuto . "\nnoDia: " . $noDia; echo tipoHorario($horaMinuto, $horaInicioMatutino, $horaInicioVespertino, $horaFinMatutino, $horaFinVespertino);*/ echo casoEspecialMatutino($horaMinuto, $horaFinMatutino); } checktime("2017-06-15 16:29:00",30); ?>

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.0060.00918.81
8.3.50.0160.00016.49
8.3.40.0120.00418.96
8.3.30.0120.00818.84
8.3.20.0080.00021.74
8.3.10.0040.00421.90
8.3.00.0050.00319.56
8.2.180.0090.00918.61
8.2.170.0140.00722.96
8.2.160.0080.00620.26
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00720.50
8.2.120.0080.00026.35
8.2.110.0060.00319.38
8.2.100.0090.00317.97
8.2.90.0040.00417.75
8.2.80.0050.00517.97
8.2.70.0040.00418.01
8.2.60.0060.00318.16
8.2.50.0040.00418.10
8.2.40.0000.00820.59
8.2.30.0040.00419.38
8.2.20.0040.00418.07
8.2.10.0070.00318.25
8.2.00.0070.00018.29
8.1.280.0100.00725.92
8.1.270.0040.00420.82
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.05
8.1.230.0060.00618.98
8.1.220.0030.00517.89
8.1.210.0040.00418.77
8.1.200.0030.00617.60
8.1.190.0110.00017.48
8.1.180.0060.00318.10
8.1.170.0040.00420.23
8.1.160.0000.00719.01
8.1.150.0070.00020.40
8.1.140.0040.00419.59
8.1.130.0030.00318.96
8.1.120.0040.00417.69
8.1.110.0040.00417.70
8.1.100.0030.00517.56
8.1.90.0000.00817.54
8.1.80.0070.00017.70
8.1.70.0030.00617.66
8.1.60.0040.00417.76
8.1.50.0050.00317.73
8.1.40.0030.00517.63
8.1.30.0000.00817.90
8.1.20.0000.00917.74
8.1.10.0040.00417.57
8.1.00.0120.00017.59
8.0.300.0030.00518.77
8.0.290.0000.00817.00
8.0.280.0030.00318.55
8.0.270.0050.00317.46
8.0.260.0030.00318.87
8.0.250.0030.00317.30
8.0.240.0030.00617.25
8.0.230.0070.00017.29
8.0.220.0000.00717.20
8.0.210.0030.00317.28
8.0.200.0080.00317.17
8.0.190.0030.00617.14
8.0.180.0030.00517.23
8.0.170.0040.00417.13
8.0.160.0070.00017.21
8.0.150.0070.00017.04
8.0.140.0050.00317.15
8.0.130.0030.00313.59
8.0.120.0000.00717.21
8.0.110.0040.00417.26
8.0.100.0040.00417.21
8.0.90.0070.00017.23
8.0.80.0110.00617.25
8.0.70.0050.00217.20
8.0.60.0000.00817.18
8.0.50.0050.00217.14
8.0.30.0100.00817.29
8.0.20.0140.00717.40
8.0.10.0000.00717.08
8.0.00.0130.00616.93
7.4.330.0000.00515.55
7.4.320.0000.00616.62
7.4.300.0000.00716.84
7.4.290.0070.00016.70
7.4.280.0080.00016.70
7.4.270.0000.00616.78
7.4.260.0080.00016.80
7.4.250.0040.00416.66
7.4.240.0040.00416.65
7.4.230.0030.00316.88
7.4.220.0000.01816.90
7.4.210.0080.00816.81
7.4.200.0030.00316.61
7.4.160.0080.00816.72
7.4.150.0070.01017.40
7.4.140.0100.01017.86
7.4.130.0120.01216.72
7.4.120.0090.01016.72
7.4.110.0080.00816.72
7.4.100.0070.01116.80
7.4.90.0130.00316.79
7.4.80.0110.00519.39
7.4.70.0070.01016.94
7.4.60.0060.00916.68
7.4.50.0120.00616.45
7.4.40.0140.00916.84
7.4.30.0060.01216.80
7.4.00.0090.00915.15
7.3.330.0050.00013.57
7.3.320.0050.00013.36
7.3.310.0070.00016.56
7.3.300.0030.00316.56
7.3.290.0070.00816.59
7.3.280.0080.00816.54
7.3.270.0130.00417.40
7.3.260.0090.01216.71
7.3.250.0110.00716.73
7.3.240.0110.00616.68
7.3.230.0110.00616.82
7.3.210.0100.00716.70
7.3.200.0100.00716.90
7.3.190.0110.00416.77
7.3.180.0080.01116.68
7.3.170.0060.01016.75
7.3.160.0110.00516.57
7.3.10.0070.00716.93
7.3.00.0070.00717.01
7.2.330.0120.00616.79
7.2.320.0110.00716.57
7.2.310.0120.00416.92
7.2.300.0000.01617.05
7.2.290.0080.00817.06
7.2.130.0040.01117.04
7.2.120.0070.00417.02
7.2.110.0100.00317.18
7.2.100.0040.00417.10
7.2.90.0070.00417.04
7.2.80.0040.01117.04
7.2.70.0070.01117.01
7.2.60.0050.00717.15
7.2.50.0120.00317.26
7.2.40.0090.00617.23
7.2.30.0000.01117.26
7.2.20.0000.01017.25
7.2.10.0060.00817.18
7.2.00.0000.01417.12
7.1.250.0040.00415.88
7.1.200.0030.00715.80
7.1.70.0040.00717.36
7.1.60.0600.01333.60
7.1.50.0600.01033.07
7.1.40.0670.01332.64
7.1.30.0530.01333.08
7.1.20.0530.01733.05
7.1.10.0430.01014.93
7.1.00.0630.01315.02
7.0.200.0470.01015.20
7.0.190.0430.01014.96
7.0.180.0600.01014.49
7.0.170.0630.00714.86
7.0.160.0470.01314.70
7.0.150.0400.01014.54
7.0.140.0800.00714.89
7.0.130.0500.01014.96
7.0.120.0470.00714.72
7.0.110.0530.01014.59
7.0.100.0470.00714.70
7.0.90.0430.01314.45
7.0.80.0470.00714.77
7.0.70.0400.01014.44
7.0.60.0430.01314.54
7.0.50.0600.01714.57
7.0.40.0430.01014.79
7.0.30.0530.01014.75
7.0.20.0470.00314.91
7.0.10.0530.00714.80
7.0.00.0470.01014.91

preferences:
59.35 ms | 400 KiB | 5 Q