Number¶
A number is either a float or an integer.
Numbers are always signed. They are limited, in range, by the constants PHP_INT_MAX, PHP_INT_MIN, and PHP_FLOAT_MAX, PHP_FLOAT_MIN.
PHP also has a concept of numeric strings, which are strings that hold numbers. Other types do not have direct conversion to numbers and need to be converted or cast.
<?php
echo 1;
echo -1.5;
echo PHP_INT_MAX;
?>
See also PHP Numbers Basics, PHP Numbers Explained and Exploring Number Manipulation in PHP.
Related : Floating Point Numbers, integer, Numeric String, Cast Operator, abs()