I would suggest something like this:
// create start and end date time
$start = new DateTime('8:00am');
$end = new DateTime('5:00pm');
// get the current time
$now = new DateTime();
// note that you can use the < > operators
// to compare date time objects
if($now >= $start && $now < $end) {
echo 'during business hours';
}
solved How can I check to see if a request is being made between certain hours on specific days?