title: How to equalize the value of the integer in the 64 Bit to 32 Bit
body: <p>I want to match the value of the integer in 64bit and 32bit systems, this is an example of my PHP script</p>
  
  <pre><code>function integer_hash_aritmathic ($value)
  {       
      $maxVal = 2147483647 &amp; 0xFFFFFFFF;
      $minVal = -2147483648 &amp; 0xFFFFFFFF;
      $hash = 0;  
  
      for ($i = 0; $i &lt; strlen($value); $i++)
      {
          $hash = (intval($hash) * 31) + ord($value[$i]);
  
          if ($hash &gt; $maxVal) $hash = $hash + $minVal - $maxVal - 1;
          else if ($hash &lt; $minVal) $hash = $hash + $maxVal - $minVal + 1;
  
      }
  
  
      return (int)$hash;
  }
  
  echo integer_hash_aritmathic ('21512510');
  </code></pre>
  
  <p>output in 32Bit System : 
  -951649475</p>
  
  <p>Output in 64Bit System : 
  1283243572029</p>
  
  <p>I want the same results on a 64bit system with 32bit, with the value of -951649475, please help me... thanks, I'am sory my english language is bad...</p>