PHP Funktion fmod ()
Beispiele
Gibt die x / y der Floating-Point-Rest:
<?php
$x = 7;
$y = 2;
$result = fmod($x,$y);
echo $result;
// $result equals 1, because 2 * 3 + 1 = 7
?>
$x = 7;
$y = 2;
$result = fmod($x,$y);
echo $result;
// $result equals 1, because 2 * 3 + 1 = 7
?>
Ausführung einer Instanz »
Definition und Verwendung
Die fmod () Funktion gibt die x / y-Floating-Point-Rest.
Grammatik
fmod( x,y );
参数 | 描述 |
---|---|
x | 必需。规定被除数。 |
y | 必需。规定除数。 |
Technische Details
Rückkehr: | Gleitkomma-Rest von x / y. |
---|---|
Rückgabetyp: | Schwimmer |
PHP-Version: | 4.2+ |
PHP Math Reference