is_int(), is_float() that works on form posted variables

Variables that are posted from forms are always strings. This can cause some problems when you want to be sure a variable is an integer or float. I made some functions that I use all the time that replaces the built in php is_int and is_float functions.

<?php
function __is_int($foo){
    return (is_numeric($foo) && intval($foo) == $foo) ? true : false;
}

function __is_float($foo){
    return (is_numeric($foo) && floatval($foo) == $foo) ? true : false;
}
?>