PHP.nl

gmp_mod

gmp_mod

Modulo operation

GMP **gmp_mod**  $num1  $num2

Calculates modulo . The result is always non-negative, the sign of is ignored. num1``num2``num2

num1``num2The modulo that is being evaluated.

gmp.return

Voorbeeld: example

<?php
$mod = gmp_mod("8", "3");
echo gmp_strval($mod) . "\n";
?>
2