Integers in PHP can be natively specified in base 2 (binary), base 8 (octal), base 10 (decimal), or base 16
Integers are 32 or 64 bits long, depending on the platform. The constant PHP_INT_SIZE holds integer size in bytes. PHP_INT_MAX and (since PHP 7.0) PHP_INT_MIN are also available.
Integer values are automatically created as needed from floats, booleans, and strings. If an explicit typecast is needed, it can be done with the (int) or (integer) cast:
Integer overflow will be handled by conversion to a float:
There is no integer division operator in PHP, but it can be simulated using an implicit cast, which always 'rounds' by just discarding the float-part. As of PHP version 7, an integer division function was added.
(Note that the extra parentheses around (25 / 4) are needed because the (int) cast has higher precedence than the division)