有没有一种更简单、更快的方法来写这个?
$currTime = date('H:i');
if ($currTime >= "12:09" && $currTime <= "16:08") {
echo rand(260, 272);
} elseif ($currTime >= "16:09" && $currTime <= "18:08") {
echo rand(278, 286);
} elseif ($currTime >= "18:09" && $currTime <= "20:08") {
echo rand(293, 303);
} elseif ($currTime >= "20:09" && $currTime <= "23:38") {
echo rand(338, 359);
} elseif ($currTime >= "23:39" && $currTime <= "23:59") {
echo rand(293, 302);
} elseif ($currTime >= "01:06" && $currTime <= "02:08") {
echo rand(195, 210);
} elseif ($currTime >= "02:09" && $currTime <= "02:23") {
echo rand(168, 179);
} elseif ($currTime >= "02:24" && $currTime <= "07:08") {
echo rand(121, 128);
} elseif ($currTime >= "07:09" && $currTime <= "09:08") {
echo rand(143, 160);
} elseif ($currTime >= "09:09" && $currTime <= "12:08") {
echo rand(187, 207);
} else {
echo rand(233, 241);
}