If you're still interested in a function to determine if an integer is even or odd:
function isEven($num) {
if ($num & 0 == 0)
return false;
else
return true;
}
The method that you found should be usable, though checking for even numbers is also viable.