PHP is_float Function

What is is_float() in PHP?

Explanation

is_float function checks whether the given input value is float or not.

Syntax:


is_float(variable)

Example :


<?php
$val=10.12;
if(is_float($val))
{
echo "This is a Float Value";
}
else
{
echo "This is not a Float Value";
}
?>

Result :

This is a Float Value

Check if a variable is a float value using PHP is_float function.

PHP Topics


Ask Questions

Ask Question