title: Converting 64 bit integer to 32 bit on a 32 bit PHP installation?
body: <p>I am making a website which requires use of the <a href="https://developer.valvesoftware.com/wiki/Steam_Web_API" rel="nofollow noreferrer">Steam API</a>. However I am having problems with converting a 64 bit integer to 32 bit in PHP. </p>
  
  <p>I saw another post, with an answer <a href="https://stackoverflow.com/a/11691810/3189588">here</a>, that lead me to using this code: </p>
  
  <pre><code>$y = 76561197998705985;
  
  $x = $y &amp; 0xffffffff;
  
  echo $x;
  </code></pre>
  
  <p>However, because I am using xampp which only has 32 bit installation, I am getting a result that is incorrect by 1 (38440256 instead of 38440257).</p>
  
  <p>The other post that I linked to above mentions using the PHP GMP extension to convert on a 32 bit installation, but through the official documentation <a href="http://php.net/manual/en/function.gmp-and.php" rel="nofollow noreferrer">here</a>, I see no helpful guidance for someone quite new to this sort of thing.</p>
  
  <p>Some clarification/help would be greatly appreciated!</p>