扫码关注官方订阅号
PHP在CLI运行的时候strtotime('2016-9-22 59:59:59') 无法返回时间戳,可是这个时间明明是正确的啊???
ringa_lee
$ php -r "var_dump(strtotime('2016-9-22 59:59:59'));" bool(false)
时间格式不合法返回时,strtotime函数返回false。这里的59点。。。
strtotime
false
php5.1.0之前,出错返回-1。
-1
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
时间格式不合法返回时,
strtotime函数返回false。这里的59点。。。