The gmp_divexact() function checks whether a GMP number is exactly divisible by another GMP number or not.
Syntax
gmp_divexact($n, $divisor)
Parameters
- n − The number
- divisor − The divisor value
Return
The gmp_divexact() function returns the result of division.
Example
The following is an example −
<?php $n = "20"; $divisor = "5"; $res = gmp_divexact($n, $divisor); echo $res; ?>
Output
The following is the output −
4