Open In App

PHP is_float() Function

Last Updated : 11 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

PHP is_float() is an inbuilt function in PHP. The is_float() function is used to find whether a variable is a float or not. 

Syntax: 

 boolean  is_float($variable_name)

Parameter: This function contains a single parameter as shown in the above syntax  and described below

  • $variable_name: the variable we want to check.

Return value: It is a boolean function so returns TRUE when $variable_name is an integer, otherwise FALSE.

The below example illustrates the working of the function is_float(). 

Example 1:

Output:

67.099 is a float value. 
32 is not a float value. 
abc is not a float value. 
FALSE is not a float value. 

Example 2

Output:

1


1

Reference: https://www.php.net/manual/en/function.is-float.php


Similar Reads