PHP 64位与php_int_max = 2147483647 [英] php 64 bit with php_int_max = 2147483647

查看:2539
本文介绍了PHP 64位与php_int_max = 2147483647的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装WampServer 2.0已经阿帕奇2.4.4,MySQL的5.6.12和PHP 5.4.12。当我赞同PHP_INT_MAX它给了我2147483647。我也有回声phpinfo()函数和结构表明64。这种假设是没有发生,因为我的PHP是64位的吧?我需要我的PHP支持64位整数。我需要我的PHP_INT_MAX是9223372036854775807。

I have install WampServer 2.0 that has apache 2.4.4, mysql 5.6.12, and php 5.4.12. When I echo PHP_INT_MAX it gave me 2147483647. I have also echo phpinfo() and the architecture indicates x64. This suppose to be not happening because my php is 64 bit right? I need my php to support 64 bit integer. I need my PHP_INT_MAX to be 9223372036854775807.

有人可以帮我吗?谢谢

推荐答案

如果您运行的是Windows操作系统,wampServer建议你,的这就是你的答案

If you're running a windows OS, wampServer suggests you are, this is your answer:

在窗口的x86_64,PHP_INT_MAX是2147483647。这是因为在
  底层C- code,长为32位。

On windows x86_64, PHP_INT_MAX is 2147483647. This is because in the underlying c-code, a long is 32 bit.

请注意,这并不意味着Windows不支持64位廉政局:的int64_t 确实存在,但它并不使用PHP AFAIK

我已经成功地拿出<一个href=\"http://www.mysqlperformanceblog.com/2007/03/27/integers-in-php-running-with-scissors-and-portability/\">this链接,在该网页上,有一些code你也许可以使用,为64位整数的支持添加到您的code

Note that this doesn't mean that Windows doesn't support 64bit int's: int64_t does exist, but it's not used by PHP AFAIK.
I've managed to come up with this link, on that page, there's some code you might be able to use, to add support for 64bit ints to your code

这篇关于PHP 64位与php_int_max = 2147483647的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆