Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP fmod() Function

PHP fmod() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Return the floating-point remainder of x/y:

Run Example »


Definition and Usage

The fmod() function returns the floating-point remainder of x/y.


Syntax

fmod(

x,y

);

Parameters Description
x Required. Specifies the dividend.
y Required. Specifies the divisor.

Technical Details

Return Value: The floating-point remainder of x/y.
Return Type: Float
PHP Version: 4.2+

PHP Math Reference Manual PHP Math Reference Manual