php计算当天剩余时间最便捷和最快的方法

9次阅读

共计 114 个字符,预计需要花费 1 分钟才能阅读完成。

最便捷的方法

echo strtotime('23:59:59')-time();

最快的方法

$now = time();
echo 86400-date('H', $now)*3600- date('i', $now)*60-date('s');

正文完
 0