Internally, PHP uses an "integer" type for most numbers. However, these only go so far: if you add a large integer to a large integer, PHP will see that the result is too big to fit into a normal integer and will assign it to a floating-point number. Floating-point numbers (floats) themselves only go so high, however, and there's a point around the sixteen-digit mark where PHP will just lose the plot entirely.
There is an option to use arbitrary-precision mathematics which supports numbers of any size and precision, represented as strings. See more here: http://us2.php.net/bc https://www.php.net/bc
Internally, PHP uses an "integer" type for most numbers. However, these only go so far: if you add a large integer to a large integer, PHP will see that the result is too big to fit into a normal integer and will assign it to a floating-point number. Floating-point numbers (floats) themselves only go so high, however, and there's a point around the sixteen-digit mark where PHP will just lose the plot entirely.
There is an option to use arbitrary-precision mathematics which supports numbers of any size and precision, represented as strings. See more here: http://us2.php.net/bc
Internally, PHP uses an "integer" type for most numbers. However, these only go so far: if you add a large integer to a large integer, PHP will see that the result is too big to fit into a normal integer and will assign it to a floating-point number. Floating-point numbers (floats) themselves only go so high, however, and there's a point around the sixteen-digit mark where PHP will just lose the plot entirely.
There is an option to use arbitrary-precision mathematics which supports numbers of any size and precision, represented as strings. See more here: https://www.php.net/bc
Internally, PHP uses an "integer" type for most numbers. However, these only go so far: if you add a large integer to a large integer, PHP will see that the result is too big to fit into a normal integer and will assign it to a floating-point number. Floating-point numbers (floats) themselves only go so high, however, and there's a point around the sixteen-digit mark where PHP will just lose the plot entirely.
There is an option to use arbitrary-precision mathematics which supports numbers of any size and precision, represented as strings. See more here: http://us2.php.net/bc