Check if a value is finite or not in PHP

Description

The following code shows how to check if a value is finite or not.

Example


  // w  w w. j a  v a  2 s.  co m
<?php
    echo is_finite(2) . "<br>";
    echo is_finite(log(0)) . "<br>";
    echo is_finite(2000);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Language Basic »




PHP Introduction
PHP Operators
PHP Statements
Variable
PHP Function Create
Exception
PHP Class Definition