Underflow¶
Underflow happens when a value goes below a limit: out of its range of existence, the behavior of the value is now unknown.
Underflow happens with integers (limited to PHP_INT_MAX and PHP_INT_MIN), floats (PHP_FLOAT_MAX and PHP_FLOAT_MIN).
Other situations, such as accessing an array element or a string character beyond its first element, defaults to returning null.
<?php
$a = PHP_INT_MAX;
$b = (int) ($a + 1);
echo $a.PHP_EOL;
echo $b;
?>
See also PHP-FPM Underflow RCE and Integer Underflow.
Related : Null, Overflow, RangeException