PHP is_finite()Function

PHP Math 参考手册PHP Math Reference Manual

Examples

Determine whether a value is finite:

<?php
echo is_finite(2) . "<br>";
echo is_finite(log(0)) . "<br>";
echo is_finite(2000);
?>

Run Example »

Definition and Usage

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

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

If the value is within the range allowed for PHP float numbers on the local platform, then the value is finite.


Syntax

is_finite(value);

Parameter Description
value Required. Specifies the value to check.

Technical Details

Return value: Ifvalueit is finite, returns TRUE. Otherwise, returns FALSE.
Return type: Boolean
PHP version: 4.2+


PHP Math 参考手册PHP Math Reference Manual Other Extensions