有什么方法可以最大化PHP_INT_MAX? [英] Is there any way to maximize PHP_INT_MAX?
问题描述
我在php.ini中找不到此行,所以有什么办法可以增加PHP_INT_MAX
?
I can't find this row in php.ini, so is there any way to increase PHP_INT_MAX
?
推荐答案
您可以增加PHP_INT_MAX.正如其他人所说,PHP_INT_MAX是依赖于平台的.这意味着在32位硬件,32位OS或32位PHP编译器上,PHP将位存储在4个字节中(最多约20亿字节).但是,如果所有3个都是64位,则最大值为8个字节(大约9e18或9,000,000,000,000,000,000).
You can increase PHP_INT_MAX. As others have said, PHP_INT_MAX is platform dependent. That means on 32 bit hardware or a 32 bit OS or a 32 bit compile of PHP, PHP stores the bit in 4 bytes (max of about 2 billion). However, if all 3 are 64 bit, the max goes to 8 bytes (about 9e18 or 9,000,000,000,000,000,000).
因此,如果您真的想要较大的整数,请购买一台64位计算机,一个64位操作系统以及一个64位PHP编译器...
So if you really want large ints, get a 64bit machine, and a 64bit OS, and a 64bit compile of PHP...
这篇关于有什么方法可以最大化PHP_INT_MAX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!