Latest web development tutorials

PHP intdiv () function

PHP 7 New Features PHP 7 New Features

PHP 7 new addition intdiv () function accepts two parameters, the return value is the value of the first argument divided by the second argument and rounding.

Examples

Examples

<? php
echo intdiv (9, 3), PHP_EOL;
echo intdiv (10, 3), PHP_EOL;
echo intdiv (5, 10), PHP_EOL;
?>

The above program execution output is:

3
3
0

PHP 7 New Features PHP 7 New Features