<?php
$today = date('d-m-Y');
$our = date('H:i:s');
//$our = '23:10:00';
$nextDay = date('Y-m-d', strtotime('now + 1day'));
if($our <= '8:00:00' && $our >= '22:00:00'):
//hello
endif;
var_dump($our);
- Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.3.33, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- string(8) "12:30:43"
- Output for 7.3.32, 7.4.26, 8.0.13
- string(8) "10:30:43"
preferences:
136.5 ms | 407 KiB | 5 Q