PHP 8.4: phpinfo: Show PHP Integer Size information
The phpinfo()
output in PHP 8.4 shows the integer size supported by the current PHP setup in bits.
The integer size is also included in the PHP CLI output:
Zend Extension => 420230901
Zend Extension Build => API420230901,TS,VS16
PHP Extension Build => API20230901,TS,VS16
+ PHP Integer Size => 64 bits
Backwards Compatibility Impact
The new PHP Integer Size
field in phpinfo()
output is only an indicative value. PHP 8.4 and all previous versions (since PHP 5.0.5) support the following PHP constants to determine the integer size and the range of supported integers.
PHP_INT_SIZE
: The integer size in bytes. e.g.64 bits
support would havePHP_INT_SIZE = 8
.PHP_INT_MIN
: The minimum supported integer value;-2147483648
in32 bit
systems and-9223372036854775808
in 64 bit systems.PHP_INT_MAX
: The maximum supported integer value;2147483647
in32 bit
systems and9223372036854775807
in 64 bit systems.