Javascript and PHP's similar function gave different output
<pre><code>&lt;?
    class int64{
        var $h;
        var $l;
        function int64($h, $l)
        {
            $this-&gt;h = $h;
            $this-&gt;l = $l;
        }
    }
    function int64rrot(int64 $dst, int64 $x, $shift)
    {
        $dst-&gt;l = ($x-&gt;l &gt;&gt; $shift) | ($x-&gt;h &lt;&lt; (32-$shift));
        $dst-&gt;h = ($x-&gt;h &gt;&gt; $shift) | ($x-&gt;l &lt;&lt; (32-$shift));
        print_r($dst);
    }
    $a =  new int64(1779033703,-205731576);
    $b =  new int64(1779033701,-205731572);
    int64rrot($a,$b,19);
?&gt;
&lt;script type="text/javascript"&gt;
    function int64rrot(dst, x, shift)
    {
        dst.l = (x.l &gt;&gt;&gt; shift) | (x.h &lt;&lt; (32-shift));
        dst.h = (x.h &gt;&gt;&gt; shift) | (x.l &lt;&lt; (32-shift));
        console.log(dst);
    }
    function int64(h, l)
    {
      this.h = h;
      this.l = l;
    }
    a =  new int64(1779033703,-205731576);
    b =  new int64(1779033701,-205731572);
    int64rrot(a,b,19);
&lt;/script&gt;
</code></pre>

<p><strong>Output in screen (by PHP:)</strong></p>

<pre><code>int64 Object ( [h] =&gt; -1725854399 [l] =&gt; -393 ) 
</code></pre>

<p><strong>Output in console (by Javascript)</strong> (Correct one):</p>

<pre><code>int64 { h=-1725854399, l=1020051063}
</code></pre>

<p>I am trying to correct this whole day. but couldn't. What modification do I need in PHP code to get the answer as javascript?</p>

<blockquote>
  <p><strong>I Want to get javascript output using php</strong></p>
</blockquote>
