How to Tell if a Number Is Whole in Php Posted on Jul 7, 2012 if ($num == (int) $num) { // It's whole } else { // It's not }