PHP is_real() Function

The PHP is_real () 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.

This function is a alias of is_float() function.

Syntax

is_real(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 a float, else it returns FALSE.

Example 1

 

Output

227.55 is a float value

Example 2

 

Output

1232 is not a float value. 

Example 3

 

Output

The var is not a Float

Example 4

 

Output

The var is Float