Funcții GMP
PHP Manual

gmp_div_r

(PHP 4 >= 4.0.4, PHP 5)

gmp_div_r — Remainder of the division of numbers

Descrierea

GMP gmp_div_r ( GMP $n , GMP $d [, int $round = GMP_ROUND_ZERO ] )

Calculates remainder of the integer division of n by d. The remainder has the sign of the n argument, if not zero.

Parametri

n

The number being divided.

Un număr GMP sub formă de resource în PHP 5.5 și anterior, un obiect GMP în PHP 5.6 și ultrior, su un șir de caractere numeric atunci când acesta poate fi convertit într-un număr.

d

The number that n is being divided by.

Un număr GMP sub formă de resource în PHP 5.5 și anterior, un obiect GMP în PHP 5.6 și ultrior, su un șir de caractere numeric atunci când acesta poate fi convertit într-un număr.

round

See the gmp_div_q() function for description of the round argument.

Valorile întoarse

The remainder, as a GMP number.

Exemple

Example #1 gmp_div_r() example

<?php
$div 
= gmp_div_r("105", "20");
echo 
gmp_strval($div) . "\n";
?>

Exemplul de mai sus va afișa:

5

A se vedea și


Funcții GMP
PHP Manual