Home >>PHP Math Functions >PHP is_finite() Function

PHP is_finite() Function

PHP is_finite() Function

PHP is_finite() function is used to check whether the given input value is finite or not. It takes only a single parameter that is the value to be checked. It returns a Boolean value TRUE (1) if the specified input is a finite number, otherwise it returns false or nothing. The given input value is finite if it is within the allowed range for a PHP float.

Syntax:

  is_finite($value);

Parameter Values

Parameter Description
value This is a required parameter. This parameter defines the value to check.

Here is an example of is_finite() function in PHP:

<html>
<body>

<?php

echo is_finite(0)."<br>";
echo is_finite(log(0))."<br>";
echo is_finite(7373)."<br>";

?>

</body>
</html>
Output:
1

1