<?
class int64{
var $h;
var $l;
function int64($h, $l)
{
$this->h = $h;
$this->l = $l;
}
}
function int64rrot(int64 $dst, int64 $x, $shift)
{
$dst->l = ($x->l >> $shift) | ($x->h << (32-$shift));
$dst->h = ($x->h >> $shift) | ($x->l << (32-$shift));
print_r($dst);
}
$a = new int64(1779033703,-205731576);
$b = new int64(1779033701,-205731572);
int64rrot($a,$b,19);
?>
<script type="text/javascript">
function int64rrot(dst, x, shift)
{
dst.l = (x.l >>> shift) | (x.h << (32-shift));
dst.h = (x.h >>> shift) | (x.l << (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);
</script>
屏幕输出(通过 PHP :)
int64 Object ( [h] => -1725854399 [l] => -393 )
控制台中的输出(通过 Javascript)(正确的一个):
int64 { h=-1725854399, l=1020051063}
我一整天都在努力纠正。但不能。我需要在 PHP 代码中进行哪些修改才能获得 javascript 的答案?
我想使用 php 获取 javascript 输出