echo strtotime('now'),'
';//现在
echo strtotime('today'),'
';//今天
echo strtotime('tomorrow'),'
';//明天
echo strtotime('yesterday'),'
';//昨天运行结果如下:
1469674869
1469664000
1469750400
1469577600
今天剩余的秒数:
echo $time_remain = strtotime('tomorrow') - time();
//输出:75531PS:本站还提供了一个Unix时间戳转换工具,非常实用,提供给大家参考:
Unix时间戳(timestamp)转换工具:
http://tools.jb51.net/code/unixtime
上一篇:怎么对PHP代码进行优化