Php/docs/function.gmp-mul

来自菜鸟教程
机器人讨论 | 贡献2020年12月10日 (四) 14:24的版本 (autoload)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至:导航、​搜索

gmp_mul

(PHP 4 >= 4.0.4, PHP 5, PHP 7)

gmp_mulMultiply numbers


说明

gmp_mul ( GMP $a , GMP $b ) : GMP

Multiplies a by b and returns the result.


参数

a

A number that will be multiplied by b.

PHP 5.5 之前为 GMP 数值资源,PHP 5.6 之后为 GMP 对象或数字,或可以转为数字的字符串。

b

A number that will be multiplied by a.

PHP 5.5 之前为 GMP 数值资源,PHP 5.6 之后为 GMP 对象或数字,或可以转为数字的字符串。


返回值

GMP 对象。


范例

Example #1 gmp_mul() example

<?php$mul = gmp_mul("12345678", "2000");echo gmp_strval($mul) . "\n";?>

以上例程会输出:


24691356000