gmp_fact
is a function in PHP that calculates the factorial of the argument passed.
gmp_fact(GMP|int|string $num): GMP
The function takes in one parameter, num
.
num
can be a numericstring
, object, or an GMP GNU Multiple Precision Arithmetic Library int
type value.
The function returns the factorial of num
. The value returned is a GMP
type number.
<?php$val1 = gmp_fact(4);echo gmp_strval($fact1) . "\n";?>
24