PHP时间和日期函数的使用

array = getdate(时间戳) 将 时间戳 转化为关联数组(ex: “month”=>“07” …)。
time() 获取当前时间戳。
date(预定于常量) 格式化输出当前时间。
microtime() 将当前时间戳划分为msec和sec两个值返回
例如时间戳为:123354.21234531 那么返回的msec=0.21234531 sec=123354
strtotime(“2019-7-24 12:10:25”) 将字符串转换为时间戳
strftime(时间戳) 将时间戳表示的时间格式化输出

floor(12.23) 12 将数据结果四舍五入取整
ceil(12.23) 13 将数据结果向上取整
bcdiv(20/ 12.3) 将两个不同精度的数据做除法

你可能感兴趣的:(PHP时间和日期函数的使用)