What is gmp_mul in PHP?
gmp_mul is a function in PHP which multiplies two numbers.
Syntax
gmp_mul(GMP|int|string $num1, GMP|int|string $num2): GMP
Parameters
The function takes in two parameters, num1 and num2.
num1andnum2can be a object, integer, or numeric string. GMP GNU Multiple Precision Arithmetic Library
Return value
The function returns the product of num1 and num2, which is a number of GMP type.
Code
<?php$val1 = gmp_mul("12345678", "20");echo gmp_strval($val1) . "\n";?>
Expected output
246913560