gmp_lcm()
The gmp_lcm()
function can be used to calculate the
least
common multiple:
var_dump(gmp_lcm(4, 6));
Executing the code shown above will print the output shown below:
object(GMP)#1 (1) {
["num"]=>
string(2) "12"
}