PHP is_infinite()Function

PHP Math 参考手册PHP Math Reference Manual

Examples

Determine whether a value is infinite:

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

Run Example »

Definition and Usage

The is_infinite() function determines whether a value is infinite.

If the specified value is finite, this function returns TRUE (1). Otherwise, it returns FALSE (no output).

If the value is within the range allowed by PHP floating point numbers on the local platform, then the value is infinite.


Syntax

is_infinite(value);

Parameters Description
value Required. Specifies the value to check.

Technical Details

Return Value: Ifvalueit is an infinite value, returns TRUE. Otherwise returns FALSE.
Return Type: Boolean
PHP Version: 4.2+


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