当前位置:网站首页>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
边栏推荐
- 51 MCU internal peripherals: timer and counter
- 神经网络学习(1)前言介绍
- [common tools] obtain system status information based on psutil and gputil
- Dark horse programmer JDBC
- 【sklearn】sklearn.preprocessing.LabelEncoder
- sql注入
- Uniapp intercepts route jumps through addinterceptor to control whether the page needs to log in
- The development of art NFT
- Do you know these methods of MySQL database optimization?
- Canvas dynamic picture avatar shaking JS special effect
猜你喜欢

mysql中的数据结果排名

Wechat applet obtains the data of ---- onenet and controls the on-board LED of STM32
![[STL]list模拟实现](/img/92/2a78382700c1ebf299c6505d962c9c.png)
[STL]list模拟实现
![[BUUCTF-n1book][第二章 web进阶]SSRF Training](/img/29/8894d04b27e0e73c4458c27bd9b935.png)
[BUUCTF-n1book][第二章 web进阶]SSRF Training

51 MCU internal peripherals: timer and counter

Feiling ok1028a core board adapts to rtl8192cu WiFi module

Comparison between symmetric encryption and asymmetric encryption

为什么说DAO是未来的公司形式

table表格展开内部行切换效果

这家十年内容产业基建公司,竟是隐形的Web3先行者
随机推荐
activemq--可持久化机制之JDBC
Leetcode-238. product of arrays other than itself
Common tool classes under JUC package
360度拖拽全景图插件tpanorama.js
Asp. Net core CMD common instructions
The operation cannot be completed because a folder or file in it is already open in another program
Silicon Valley classroom lesson 12 - official account on demand course and live broadcast management module
Django4.0 + web + MySQL 5.7 realize simple login operation
Query efficiency increased by 10 times! Three optimization schemes to help you solve the deep paging problem of MySQL
What is steel grating?
28. Slot
OmniPeek packet capturing tool
[common tools] obtain system status information based on psutil and gputil
Uniapp intercepts route jumps through addinterceptor to control whether the page needs to log in
activemq--死信队列
Unity ugui interaction (new ideas)
The garbage classification data set used in the excellent Yolo target detection training is shared - about 3000 labeled
学习周刊-总第 63 期-一款开源的本地代码片段管理工具
leetcode-238.除自身以外数组的乘积
This is the worst controller layer code I've ever seen