title: Check if given number is Even, Odd or Neither in PHP?
body: <p>How can I get if a number is even or odd or neither (have decimal, like <code>1.5</code>) with PHP? I know that there are operators like <code>*</code>, <code>/</code>, but they did not work.<br>
  Here's a try (of course it did not) (work that's just to find if it's a even number):</p>
  
  <pre><code>function even($n) {
      return (($n/2)*2 == $n);
  }
  echo even(1); // true (should be false)
  echo even(2); // true
  </code></pre>