Art, Science & Philosophy
if ($num == (int) $num) { //It’s whole } else { //It’s not }
So simple… more here