Added in 4.3

$modinv(base, modulus)

Returns the inverse modulus for the specified base and modulus.

Parameters

base - The base to calculate for.
modulus - The modulus to calculate for.

Example

//echo -ag The inverse modulus for 2 and 1907 is $modinv(2, 1907)