PHP is infinite

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : is_infinite() function

Description

The is_infinite() function is used to find whether a value is infinite or not.

Version

(PHP 4 and above)

Syntax

is_infinite(num)

Parameter

Name

Description

Required /
Optional

Type

num

The value to be checked.

Required

Float

 

Return value

TRUE if num is infinite number otherwise FALSE.

Value Type : Boolean

Pictorial Presentation

php math is_infinite() function

Example :

  1. $fval1=10.21;  

  2. $fval2=-255550.85;  

  3. echo is_infinite($fval1);  

  4. echo"
    ";  

  5. echo is_infinite($fval2);  

  6. ?>   

Output of the example

1