Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP is_infinite() Function

PHP is_infinite() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Check whether a value is infinite:

" ; echo is_infinite ( log ( 0 ) ) . "
" ; echo is_infinite ( 2000 ) ; ?>

Run Example »


Definition and Usage

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

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

A value is infinite if it is within the range allowed for PHP floating-point numbers on the local platform.


Syntax

is_infinite(

value

);

Parameters Description
value Required. Specifies the value to check.

Technical Details

Return Value: If both the value Returns TRUE if the value is infinite; otherwise, FALSE.
Return Type: Boolean
PHP Version: 4.2+

PHP Math Reference Manual PHP Math Reference Manual