How to check if a variable is an integer with PHP

1 · Josh Sherman · Aug. 28, 2013, midnight
PHP has a variety of functions and approaches to determine if a variable is a number and/or an integer. The problem is that many of the straight forward approaches can result in false positives depending on how they react to type juggling. Case in point, is_int() will return false for......