← All built-ins / intdiv()
intdiv()
intdiv(...$args): int
Parameters
| Name | Type | Description |
|---|---|---|
| $a | int | dividend |
| $b | int | divisor (must not be 0) |
Return value
Integer division truncated toward zero.
Example
echo intdiv(7, 2), " ", intdiv(-7, 2);
3 -3