is_finite

Finds whether a value is a legal finite number

Syntax

is_finite ( float $val ) : bool

Parameters

val

The value to check

Return

TRUE if val is a legal finite number within the allowed range for a PHP float on this platform, else FALSE.

Examples

<?

$val = 0;

$return = is_finite($val);

echo $return;

?>
1

PHP

Home Menu