PHP is_int(),is_int函數 檢測變數是否是整數 - PHP100
Simon Neaves was close on explaining why his function is perfect choice for testing for an int (as possibly most people would need). He made some errors on his ctype_digit() output though - possibly a typo, or maybe a bug in his version of PHP at the time...