PHP intdiv() Function
PHP 7 introduced the intdiv() function, which takes two parameters and returns the integer result of dividing the first parameter by the second.
Example
Example
<?php
echo intdiv(9,3),PHP_EOL;
echo intdiv(10,3),PHP_EOL;
echo intdiv(5,10),PHP_EOL;
?>
echo intdiv(9,3),PHP_EOL;
echo intdiv(10,3),PHP_EOL;
echo intdiv(5,10),PHP_EOL;
?>
The above program produces the following output:
3 3 0
Other Extensions
PHP 7 New Features