一、概述
在32位数下strtotime()最大的日期只能2038年,超过这个时间,将返回false。
二、问题排查
使用file命令查看php二进制文件的位数
file ./php
输出结果如果是ELF 64-bit LSB executable, x86-64
表示是64位数的,输出结果PE32+ executable (console) x86-64, for MS Windows
表示是32位的
在32位数下strtotime()最大的日期只能2038年,超过这个时间,将返回false。
使用file命令查看php二进制文件的位数
file ./php
输出结果如果是ELF 64-bit LSB executable, x86-64
表示是64位数的,输出结果PE32+ executable (console) x86-64, for MS Windows
表示是32位的
评论 (0)