(PHP 4 >= 4.0.4, PHP 5, PHP 7)
gmp_mul — Multiply numbers
$a
$b
Multiplies a by b and returns the result.
a
b
A number that will be multiplied by b.
PHP 5.5 之前为 GMP 数值资源,PHP 5.6 之后为 GMP 对象或数字,或可以转为数字的字符串。
A number that will be multiplied by a.
PHP 5.5 之前,返回 GMP 数值资源,PHP 5.6 之后,返回 GMP 对象。
Example #1 gmp_mul() example
<?php$mul = gmp_mul("12345678", "2000");echo gmp_strval($mul) . "\n";?>
以上例程会输出:
24691356000