How to Tell if a Number Is Whole in Php

if ($num == (int) $num) {
    // It's whole
} else {
    // It's not
}