Latest web development tutorials

PHP is_infinite () function

PHP Math Reference PHP Math Reference

Examples

Determine whether a value is infinite value:

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

Running instance »

Definition and Usage

is_infinite () function to determine whether a value is infinite value.

If the specified value is a finite value, the function returns true (1). Otherwise, it returns false / nothing.

If the value is on the native platform PHP floating point numbers are within the allowable range, the value is unlimited value.


grammar

is_infinite( value );

参数 描述
value 必需。规定要检查的值。

technical details

return value: If the value is infinite value, returns TRUE. Otherwise, it returns FALSE.
Return type: Boolean
PHP version: 4.2+


PHP Math Reference PHP Math Reference