```
The modulus operator is very poorly suited for such a simple operation as determining if an int is even or odd. On most common systems, modulus performs a division, which is a very slow operation.
```

A much better way to find if a number is even or odd is to use the bitwise & operator.

e.g.

$is_odd = $x & 1; //using and

$is_odd = $x % 2; //using modulus