Use datetime since it is overloaded to work with comparison operators.
$b2 = new DateTime('18:02:15');
$lb = new DateTime('17:00:00');
$ub = new DateTime('18:30:00');
iif ($b2 >= $lb && $b2 <= $ub)
printf('%s is between %s and %s' . PHP_EOL,
$b2->format('H:i:s'), $lb->format('H:i:s'), $ub->format('H:i:s'));
So long as you don't have to concern yourself with a mix between Dates and Times (but either full date and time or just time will work), than that should work fine.