Posted By

theworldofdan on 07/21/11


Tagged


Versions (?)

Odd or even?


 / Published in: PHP
 

  1. <?php
  2. function is_odd($int)
  3. {
  4. return $int & 1; // 0 = even, 1 = odd
  5. }

Report this snippet  

You need to login to post a comment.