Home > Backend Development > PHP Tutorial > strtotime函数一个很奇怪的有关问题

strtotime函数一个很奇怪的有关问题

WBOY
Release: 2016-06-13 12:24:15
Original
853 people have browsed it

strtotime函数一个很奇怪的问题

<br />var_dump(strtotime('1441185010'));<br />//输出bool(false)<br />var_dump(strtotime('1451382400'));<br />//输出int(13591003898)<br />
Copy after login

很奇怪,为什么这两个的结果不一样呢?
------解决思路----------------------
我PHP5.6返回两个false,你的PHP是什么版本。
------解决思路----------------------
由于你传递给 strtotime 的是是时间戳,所以即便不是 false 也是不对的
echo date('Y-m-d H:i:s', 13591003898); //1992-05-17 19:26:50

------解决思路----------------------
楼主你去看看这个帖子。。。。http://bbs.csdn.net/topics/391822092

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template