示例
var_dump(is_int(23)); //bool(true)
echo "<br/>";
var_dump(is_int("23")); //bool(false)
echo "<br/>";
var_dump(is_int(23.5)); //bool(false)
echo "<br/>";
var_dump(is_int(NULL)); //bool(false)
echo "<br/>";
var_dump(is_int("")); //bool(false)
echo "<br/>";
var_dump(ctype_digit(23)); //bool(true)
echo "<br/>";
var_dump(ctype_digit("23")); //bool(false)
echo "<br/>";
var_dump(ctype_digit(23.5)); //bool(false)
echo "<br/>";
var_dump(ctype_digit(NULL)); //bool(false)
echo "<br/>";
var_dump(ctype_digit("")); //bool(true)
echo "<br/>";
var_dump(is_integer(23)); //bool(true)
echo "<br/>";
var_dump(is_integer("23")); //bool(false)
echo "<br/>";
var_dump(is_integer(23.5)); //bool(false)
echo "<br/>";
var_dump(is_integer(NULL)); //bool(false)
echo "<br/>";
var_dump(is_integer("")); //bool(false)
echo "<br/>";
尝试一下