In the world of computing, there are many limits based upon the mathematical model of the computer hardware we use.
For instance, if we decided to represent an integer number in 1 bit of memory, then we would be able to represent the numbers 0 and 1.
If we were to increase that to the more common values of 8
, 16
, 32
or 64 bits
then we can represent the following number of distinct values:
2^8 - 256
,
2^16 - 65,536
,
2^32 - 4,294,967,296
,
- or
2^64 - 18,446,744,073,709,551,616
.
Of course, if we wish to be able to represent negative numbers then we can sign the integer (use one bit to indicate negative or positive). In the case of a 32 bit signed integer
this would allow us to represent the numbers: −(2^31)
to 2^31 − 1
or -2,147,483,648
to +2,147,483,647
(the same upper limit as the number in your question).
Integers are arguably the simplest form of number representation in a computer system (beyond straight binary), but because of the inherent limits of the system, we will often need to use other systems for larger numbers that we cannot represent with an integer. PHP will switch from using an integer to using floating point numbers when the limit is exceeded.
The limit you are seeing in PHP is compiled in, and will depend upon the architecture of the compiler. It looks as if your PHP was compiled as 32 bits.
You can read up far more on computer number systems on Wikipedia.