I l@ve RuBoard Previous Section Next Section

bcmod

string bcmod(string operand, string modulus) 

operand

Number to divide

modulus

Modulus

Determines the modulus of a number.

Returns:

Modulus of operand

Description:

Returns the modulus of the first number, using the second number. This function doesn't use a decimal-places modifier.

Version:

Existing since version 3.0

Example:

Calculate modulus from two large numbers
$num1 = "9912343"; 
$num2 = "10"; 
echo bcmod($num1,$num2); 

Output: 
3 
    I l@ve RuBoard Previous Section Next Section