intdiv exists so you stop casting a float division

Integer division was (int) ($a / $b), which converts to float first and back — so for large values the result is wrong in a way that only appears past 2^53.

intdiv(10, 3);          // 3
intdiv(-10, 3);         // -3, truncated toward zero
intdiv(PHP_INT_MAX, 1);  // exact

(int) (PHP_INT_MAX / 1); // not exact — went through a float

intdiv(1, 0);           // DivisionByZeroError, not a warning and NAN

The error rather than a warning is the other improvement: 1/0 emitted a warning and evaluated to INF for years, which propagates silently through arithmetic. intdiv throws, and so does the % operator. Truncation toward zero rather than flooring is worth remembering for negative operands, since floor(-10/3) is -4 and intdiv(-10, 3) is -3.