代码如下:
<?php var_dump(strtotime("2099-01-01 00:00:00")); var_dump(strtotime("2069-01-01 00:00:00")); var_dump(strtotime("2038-01-19 03:14:07")); phpinfo();
运行结果如下图:
环境是64位的,很奇怪。
官方文档说明:
Note:
If the number of the year is specified in a two digit format, the values between 00-69 are mapped to 2000-2069 and 70-99 to 1970-1999. See the notes below for possible differences on 32bit systems (possible dates might end on 2038-01-19 03:14:07).官方说明32位系统最大处理时间为:2038-01-19 03:14:07,我的是64位系统,感觉很奇怪啊。。