Is there any way to maximize PHP_INT_MAX?

前端 未结 4 1860
没有蜡笔的小新
没有蜡笔的小新 2020-12-10 06:09

I can\'t find this row in php.ini, so is there any way to increase PHP_INT_MAX?

相关标签:
4条回答
  • 2020-12-10 06:27

    You can not control it actually. However, if you are dealing with BIG numbers, I would suggest you the:

    BC Math extension.

    0 讨论(0)
  • 2020-12-10 06:33

    Nope. It's hardware/os limitation, not PHP.
    You can use bcmath fructions for large numbers

    0 讨论(0)
  • 2020-12-10 06:40

    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).

    So if you really want large ints, get a 64bit machine, and a 64bit OS, and a 64bit compile of PHP...

    0 讨论(0)
  • 2020-12-10 06:50

    No.

    From http://www.php.net/manual/en/reserved.constants.php:

    These constants are defined by the PHP core. This includes PHP, the Zend engine, and SAPI modules.

    0 讨论(0)
提交回复
热议问题