title: PHP 64 bit numbers?
body: <p>I have a simple function that I'm using but for some reason the number doesn't calculate correctly as it would in a calculator.  I think it has something to do with the numbers being too large, or something to do with 64 bit.  Is there any way I can convert them so that they would work correctly?</p>
  
  <pre><code>$sSteamComID = 76561197990369545;
  $steamBase = 76561197960265728;
  
  function convertToSteamID($sSteamComID) {
      $sServer = bcmod($sSteamComID, '2') == '0' ? '0' : '1';
   $sCommID = bcsub($sSteamComID, $sServer);
   $sCommID = bcsub($sCommID, $steamBase);
   $sAuth = bcdiv($sCommID, '2');
  
   echo "$sServer:$sAuth";
  }
  
  convertToSteamID($sSteamComID);
  </code></pre>
  
  <p>This function outputs 0:15051912 on a server when it should be printing 1:15051908</p>