Perform some integer divisions:
<?php
echo intdiv(8, 4) . "<br>";
echo intdiv(5, 2) . "<br>";
echo intdiv(-5, -2);
?>
Try it Yourself »
The intdiv() function is used for integer division.
intdiv(
dividend,
divisor);
Parameter | Description |
---|---|
dividend | Required. Specifies a number that will be divided |
divisor | Required. Specifies the number to divide the dividend by |
Return Value: | The integer part of the division |
---|---|
Return Type: | Integer |
PHP Version: | 7+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!