PHP is_int Function
What is is_int() in PHP?
Explanation
is_int function checks whether the given input variable is an integer or not.
Syntax:
is_int(variable)
Example :
<?php
$val=10;
if(is_int($val))
{
echo "This is an integer Value";
}
else
{
echo "This is not an integer Value";
}
?>
Result :
This is an integer Value
Check if a variable is an integer value using
PHP is_int function.