PHP function intdiv()

Availability in PHP 7.0

Integer division

Parameters

Parameter Data type Default value Note
$dividend ???
$divisor ???

Return values

int

If divisor is 0, a {@link DivisionByZeroError} exception is thrown. If the dividend is PHP_INT_MIN and the divisor is -1, then an {@link ArithmeticError} exception is thrown.

Other resources

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.