gmp_add

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

gmp_addAdd numbers

Beschreibung

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

Add two numbers.

Parameter-Liste

num1

The first summand (augent).

Ein GMP-Object, ein Integer oder eine numeriche Zeichenkette.

num2

The second summand (addend).

Ein GMP-Object, ein Integer oder eine numeriche Zeichenkette.

Rückgabewerte

A GMP number representing the sum of the arguments.

Beispiele

Beispiel #1 gmp_add() example

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

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

200000000000000

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top