(PHP 4 >= 4.0.4, PHP 5, PHP 7)
gmp_add — Add numbers
$a
$b
Add two numbers.
a
A number that will be added.
PHP 5.5 이전에서 GMP 수 resource나, PHP 5.6 이후에서 GMP 객체, 또는 수로 변환할 수 있는 문자열일 수 있습니다.
b
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