/** * 返回今日开始和结束的时间戳 * * @return array */function today(){ list($y, $m, $d) = explode('-', date('Y-m-d')); return [ mktime(0, 0, 0, $m, $d, $y), mktime(23, 59, 59, $m, $d, $y) ];}/** * 返回昨日开始和结束的时间戳 * * @return array */function yesterday(){ $yesterday