问题:
PHP处理时间的时候报错: A non well formed numeric value encountered
问题原因:
这种现象常常出现在弱类型语言上!时间戳并不是真正的int类型, 这种问题经常出现在从数据库中提取出数据,但是数据不是int类型的,可能是varchar等等。
解决方法:
使用 intval() 函数将不匹配的数据类型转换成int数据类型即可
问题:
PHP处理时间的时候报错: A non well formed numeric value encountered
问题原因:
这种现象常常出现在弱类型语言上!时间戳并不是真正的int类型, 这种问题经常出现在从数据库中提取出数据,但是数据不是int类型的,可能是varchar等等。
解决方法:
使用 intval() 函数将不匹配的数据类型转换成int数据类型即可