如何在PHP中使用64位整数? [英] How can I have a 64-bit integer in PHP?
本文介绍了如何在PHP中使用64位整数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在PHP中使用64位整数?
How can I have a 64-bit integer in PHP?
似乎不是通过配置文件,而是可能是编译时选项,并且取决于平台.
It seems like it is not by a config file, but rather it might be a compile-time option, and it depends on the platform.
推荐答案
本地64位整数需要64位硬件和64位版本的PHP.
Native 64-bit integers require 64-bit hardware AND the 64-bit version of PHP.
在32位硬件上:
$ php -r 'echo PHP_INT_MAX;'
2147483647
在64位硬件上:
$ php -r 'echo PHP_INT_MAX;'
9223372036854775807
这篇关于如何在PHP中使用64位整数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文