gmp_pow()
is a function in PHP that calculates the value of the number raised to the power of another number.
gmp_pow(GMP|int|string $num, int $exp): GMP
num
: It is the base number. num
can be a numeric string, GMP object, or of the integer type.
exp
: It is the exponent. exp
can only be of the integer type.
gmp_pow()
function returns the value of num
raised to the exp
. The value returned is of type GMP
.
<?php$base = gmp_pow('100', 2);echo "The result of the gmp_pow function is: ".$base;?>
The result of the gmp_pow function is: 10000