title: PHP Modulo and pow()
body: <p>Can this be made robust? at various points I'm finding that <code>5 % 2 = 0</code>
  and I've never encountered this 'quirk' before, and probably due to ignorance around precision :/</p>
  
  <pre><code>$checkPrimeCubeRoots = array(125, 124);
  
  foreach ($checkPrimeCubeRoots as $int)
  {
      $cubeRoot = pow($int, 1/3); // double
      // $int = 125, gives $cubeRoot = 5
      // $int = 124, gives $cubeRoot = 4.986....
  
      // some code that check for prime, but let's just check if divisble by 2
  
      echo $cubeRoot % 2;            // 0 -&gt; yup 5 is divisible by 2
      echo intval($cubeRoot) % 2;    // 0 -&gt; yup
  
      // try round -&gt; but gives false positive for 124
      echo round ($cubeRoot) %2;     // 1 -&gt; nope, but in both cases :/   
  }
  </code></pre>