当前位置:网站首页>PHP date() function does not support processing numbers greater than 2147483648? "Suggested collection"
PHP date() function does not support processing numbers greater than 2147483648? "Suggested collection"
2022-07-25 09:17:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
PHP Code :
<?php
echo 2147483648 + 100;
echo '<br>';
echo date('Y-m-d', 2147483648);
?>Display the results after running , It can be seen that the first operation correctly supports processing 2147483648 + 100, But the second line shows 1901 Years. :
First php yes 64 Bit ,windows It's also 2012 64 position , apache It's also 64 Bit :
Why is there such a serious problem , floatval() Definitely not , Because the decimal point is also stored in the database after it is processed , Then there will be a serious logical disaster of judgment ,
such as if(floatval($_GET[id]) === 123) Even if the id=123 It also believes that it is not true to return false , Why can't program code deal with integers strictly according to the standards of Mathematics , All pure numbers are integers ??? The test shows that it is not php Whether the version is upgraded , It is TMD all Windows Of php All have this BUG, Even if your php and windows Is full of 64 Not even a bit , Many functions do not support processing greater than 21 Billion
At first, I didn't notice php 5.6.23 You can have a look php The release notes of : Only php 7 Just really solved 64 The problem of digit operation ( Regardless of x86、x64) So you should upgrade one step php7 In place , Instead of struggling with historical issues on the lower version
PHP7 Next , That's all right. , Normal output
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/111448.html Link to the original text :https://javaforall.cn
边栏推荐
- uniapp中scroll-view的坑
- 【npm】 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
- Redis/Mysql知识概述
- Anti shake and throttling
- Additional: SQL statement area / county in the lower half (data table)
- [deep learning] mask Dino Trilogy - the correct way to open Detr Pandora's box
- activemq--消息重试机制
- [machine learning] Finally, the important steps of machine learning modeling have been clarified
- Composition of the interview must ask items
- Dark horse programmer JDBC
猜你喜欢

Comments on specific applications of camera

Opencv realizes simple face tracking
![[deep learning] mask Dino Trilogy - the correct way to open Detr Pandora's box](/img/5c/52ccc0583451eba15fec18adb1499e.png)
[deep learning] mask Dino Trilogy - the correct way to open Detr Pandora's box

C语言实现二叉平衡树

JS touch screen game source code ice and snow journey
![[C language] dynamic memory management, flexible array](/img/da/b9455885df0cb6646908e3655d62c5.png)
[C language] dynamic memory management, flexible array

Solve the syntaxerror: unexpected end of JSON input
![[STL]list模拟实现](/img/92/2a78382700c1ebf299c6505d962c9c.png)
[STL]list模拟实现
![[deep learning] overview | the latest progress of deep learning](/img/b9/6117862397dcda4d555c819e913c9b.png)
[deep learning] overview | the latest progress of deep learning

PL/SQL工具导出sql文件所使用的命令是什么?
随机推荐
BGP border gateway protocol basic knowledge points
Robot jumping problem
This is the worst controller layer code I've ever seen
uni-app - Refused to display ‘xxx‘ in a frame because an ancestor violates the following Content Sec
activemq--异步投递
Unity ugui interaction (new ideas)
JDBC的api全解
Redis learning notes
OpenCV实现简单的人脸追踪
[STL]stack&queue模拟实现
SQL injection
Illustration leetcode - 919. Complete binary tree inserter (difficulty: medium)
js触屏小游戏源码冰雪之旅
Opencv realizes simple face tracking
Full solution of JDBC API
Sort out Huawei ap-3010dn_ V2 configuration create WiFi
机器人跳跃问题
c语言中的六个存储类型:auto register static extern const volatile
超赞的yolo目标检测训练所用垃圾分类数据集共享——标注好的约3000张
Troubleshooting error: NPM install emojis list failed