= 4.0.4, PHP 5, PHP 7, PHP 8)gmp_add — Add numbers說明gmp_add(GMP|int|string $num1, GMP|int|string $num2): GMPAdd two numbers. 參數(shù)num1The ">

gmp_add

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

gmp_addAdd numbers

說明

gmp_add(GMP|int|string $num1, GMP|int|string $num2): GMP

Add two numbers.

參數(shù)

num1

The first summand (augent).

GMP 對象或 int ,或數(shù)字string。

num2

The second summand (addend).

GMP 對象或 int ,或數(shù)字string。

返回值

A GMP number representing the sum of the arguments.

范例

示例 #1 gmp_add() example

<?php
$sum 
gmp_add("123456789012345""76543210987655");
echo 
gmp_strval($sum) . "\n";
?>

以上例程會輸出:

200000000000000