gpt4 book ai didi

php - strtotime 在 php 中返回的时间戳的大小

转载 作者:行者123 更新时间:2023-12-02 15:23:58 27 4
gpt4 key购买 nike

php中strtotime()方法返回的时间戳大小是多少?我猜它可能是 32 位的。有没有办法在 php 中从 strtotime('now') 获取 64 位时间戳?

最佳答案

取决于您使用的 PHP 架构。 32 位 PHP = 32 位时间戳,64 位 PHP = 64 位时间戳。

不考虑架构的建议解决方案

正如 Mark Ba​​ker 所提到的,使用 DateTime 对象是一个更安全的选择。这避免了架构检测的使用,并提供了过多的功能。

关于php - strtotime 在 php 中返回的时间戳的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31943776/

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