有几个简单的获取时间的函数
1 2 3 4 5 6 7 8 9 |
echo time()."<br />"; echo date('Y-m-d')."<br />"; echo microtime()."<br />"; echo gettimeofday(true)."<br />"; var_dump(gettimeofday()); |
输出结果依次是
1 2 3 4 5 6 7 8 9 10 11 12 13 |
1423397710 2015-02-08 0.00971600 1423397710 1423397710.0097 array (size=4) 'sec' => int 1423397710 'usec' => int 9716 'minuteswest' => int 0 'dsttime' => int 0 |