Given two numbers and we have to find their division in PHP.
To find an integer division of two numbers in PHP, we can use intdiv() function, it accepts dividend and divisor and returns the result as an integer.
Syntax:
intdiv(divident, divisor);
Example:
Input:
$a = 10;
$b = 3;
Function call:
intdiv($a, $b);
Output:
3
intdiv() example in PHP
Here we are finding the division using two ways 1) divident/divisor – the result is a float value and 2) intdiv(dividend, divisor) – the result is an integer value.
Output
need an explanation for this answer? contact us directly to get an explanation for this answer