Was reading the PHP manual on integer overflow in the manual and was wondering: is there a PHP pre-defined constant for the current largest integer value possible? Something equivalent to the JavaScript Number.MAX_VALUE
constant.
From here:
PHP_INT_MAX (integer)
Available since PHP 4.4.0 and PHP 5.0.5
PHP_INT_MAX
according to PHP.net. Please note that the actual max value depends on whether PHP is compiled for 32bit or 64bit.
Also, you can use PHP_INT_SIZE
to get the size of the integer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With