gmp_mod

PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
gmp_mod - Modulo operation
Manual
Code Examples

gmp_mod( GMP|int|string$num1, GMP|int|string$num2 ): GMP

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

Parameters

num1

A GMP object, an int or a numeric string.

num2

The modulo that is being evaluated.

A GMP object, an int or a numeric string.

Return Values

A GMP object.

Example of gmp_mod

Show all examples for gmp_mod

PHP Version: