You can check if the variable is integer or not like this:
is_int($variable)
if its integer it returns true, if not, false.
And for the other type functions its the same.
is_bool, is_string,is_array etc.
You can also use
echo gettype($var);
Which prints the type of variable.