PHP is_finite()
Published Jul 29, 2023
Contribute to Docs
The is_finite() function evaluates whether the passed value is finite or not and returns a boolean value.
Syntax
$result = is_finite($value);
Returns 1 (true) if the $value is finite, nothing (false) otherwise.
Example
The example below demonstrates the use of the is_finite() function to check whether a number is finite or not.
<?php$result = is_finite(100);echo $result;?>
This will result in the following output:
1
Codebyte Example
The codebyte below uses the is_finite() function on a pair of values to evaluate whether they are finite:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn PHP on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours