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

PHP is_finite() Function

PHP is_finite() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Check whether a value is finite:

"; echo is_finite(log(0)) . "
"; echo is_finite(2000); ?>

Run Example »


Definition and Usage

The is_finite() function checks whether a value is finite.

If the specified value is finite, this function returns true (1). Otherwise it returns false/nothing.

A value is finite if it is within the range allowed for PHP floating-point numbers on the local platform.


Syntax

is_finite(

value

);

Parameters Description
value Required. Specifies the value to check.

Technical Details

Return Value: If both the value Returns TRUE if the value is finite; otherwise, FALSE.
Return Type: Boolean
PHP Version: 4.2+

PHP Math Reference Manual PHP Math Reference Manual