©
This document uses PHP Chinese website manual Release
(PHP 4 >= 4.0.4, PHP 5, PHP 7)
gmp_add — Add numbers
$a
, GMP $b
)Add two numbers.
a
A number that will be added.
可以是一个 GMP 数据 resouce ,或一个可以转换为数值的字符串。
b
A number that will be added.
可以是一个 GMP 数据 resouce ,或一个可以转换为数值的字符串。
A GMP number representing the sum of the arguments.
Example #1 gmp_add() example
<?php
$sum = gmp_add ( "123456789012345" , "76543210987655" );
echo gmp_strval ( $sum ) . "\n" ;
?>
以上例程会输出:
200000000000000