title: How can I make the PHP version of Bitwise XOR match the javascript version?
body: <p>How can I make the PHP version of Bitwise XOR match the javascript version?</p>
  
  <p>The javascript version gives me 1080</p>
  
  <pre><code>(f6o5y5^t0u1)+(p6t0k1^l2v2)+(j0u1f6^d4d4)+(p6t0k1^l2v2)
  </code></pre>
  
  <p>While the PHP gives me 0000</p>
  
  <pre><code>$a = f6o5y5^t0u1 &amp; 0xffffffff;
  if ($a &amp; 0x80000000)
    $a -= 0x100000000;
  
  $b = p6t0k1^l2v2 &amp; 0xffffffff;
  if ($b &amp; 0x80000000)
    $b -= 0x100000000;
  
  $c = j0u1f6^d4d4 &amp; 0xffffffff;
  if ($c &amp; 0x80000000)
    $c -= 0x100000000;
  
  $d = p6t0k1^l2v2 &amp; 0xffffffff;
  if ($d &amp; 0x80000000)
    $d -= 0x100000000;
  
  echo $a.$b.$c.$d;   
  </code></pre>