Skip to content

Arithmetic Error

ArithmeticError occurs when invalid mathematical operations happen.

try {
intdiv(PHP_INT_MIN, -1);
} catch (ArithmeticError $e) {
echo $e->getMessage();
}