Php program to check the input is integer or float

A Php program to check the input is integer or float. Using this program we can find the check the input is integer or float. The most basic type is Boolean. A true type value is a Boolean expression. It’s used in control structures like if statements to test elements of them. Either TRUE or FALSE is possible.

<?php
$x = 1000;
var_dump(is_int($x));
echo "<br>";
$x = 10.00;
var_dump(is_int($x));
?>

 

Output:

bool(true)
bool(false)