is_float

(FW >= 1.0)

  is_float - checks if a variable is a float

Description

int is_float( mixed $var )
Returns 1 if the variable is a float, otherwise returns 0

Parameters

var

variable to check

Return Value

returns 1 if the variable is a a float

Examples

<? 
$x=1;
print(is_float($x)); // outputs 0 since x is an integer
$y=1.0;
print(is_float($y)); // outputs 1
?>