PHP is_float() Function

The PHP is_float() function in PHP is used to  find whether the type of the specified variable is a float or not. It returns a Boolean value true if the parameter var is a float else it returns false.

Syntax

is_float ( mixed  $var ) 

Parameter

var(required)- This parameter represents the value to check.

Return

This function returns a Boolean value TRUE if the parameter var is float, else it returns FALSE.

Example 1

 

Output

127.55 is a float value

Example 2

 

Output

1232 is not a float value. 

Example 3

 

Output

The var is not an Array

Example 4

 

Output

The var is Float