Intval issues with different maximum range on win7x64 and CentOS

Source: Internet
Author: User
Intval problems with different maximum range on win7x64 and CentOS
has been developed using win7x64, a Web server with a php5.5 built-in Web server,
Yesterday suddenly found a problem, the same code, on Win7 and CentOS, the results are different:
Var_dump (intval (' 21474836470 '));
Output on Win7: int 2147483647
In CentOS output: int 30000000000

The manual says:
The maximum value depends on the operating system. 32-bit system maximum signed integer range is 2147483648 to 2147483647
On a 64-bit system, the maximum signed integer value is 9223372036854775807.

But my system is win7x64 ah, download PHP also verified the next, is the 64-bit version,
Why does it appear that Intval is a 32-bit effect???
Looking at phpinfo under Windows, you can also see that it is 64-bit:
PHP Version 5.5.14
System Windows NT 7d494368868afa1 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) AMD64
Build Date June 25 2014 12:37:32
Compiler MSVC11 (Visual C + + 2012)
Architecture x64
------to solve the idea----------------------
This not only depends on the operating system version, but also the version of PHP, the official release of PHP version is 32-bit
------to solve the idea----------------------
Whether you need to develop with a 64-bit version depends on the operating environment.
Otherwise, your project will be aborted due to the 64-bit server not being found.
In addition, 64-bit systems are true and false: 64-bit system 64-bit architecture and 64-bit system 32-bit architecture (32-bit and quasi-32-bit in 32-bit systems)

Then there is, or the problem with you may be a bug (can be found on the bug site) is now 5.6.9, may have been repaired?
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.