gpt4 book ai didi

php time() 与 mktime() 当前时间戳

转载 作者:行者123 更新时间:2023-12-02 19:30:30 25 4
gpt4 key购买 nike

使用带默认参数的函数time()mktime()获取当前时间戳有什么区别吗?

最佳答案

“从 PHP 5.1 开始,当不带参数调用时,mktime() 会抛出 E_STRICT 通知:请改用 time() 函数。”

http://php.net/manual/en/function.mktime.php

如果您想使用日期/时间,我建议使用 DateTime。

关于php time() 与 mktime() 当前时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15682916/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com