function mix ($a, $b, $c) {
$a -= $b; $a -= $c; $this->to_int_32($a); $a = (int)($a ^ ($this->zero_fill($c, 13)));
$b -= $c; $b -= $a; $this->to_int_32($b); $b = (int)($b ^ ($a << 8));
$c -= $a; $c -= $b; $this->to_int_32($c); $c = (int)($c ^ ($this->zero_fill($b, 13)));
$a -= $b; $a -= $c; $this->to_int_32($a); $a = (int)($a ^ ($this->zero_fill($c, 12)));
$b -= $c; $b -= $a; $this->to_int_32($b); $b = (int)($b ^ ($a << 16));
$c -= $a; $c -= $b; $this->to_int_32($c); $c = (int)($c ^ ($this->zero_fill($b, 5)));
$a -= $b; $a -= $c; $this->to_int_32($a); $a = (int)($a ^ ($this->zero_fill($c, 3)));
$b -= $c; $b -= $a; $this->to_int_32($b); $b = (int)($b ^ ($a << 10));
$c -= $a; $c -= $b; $this->to_int_32($c); $c = (int)($c ^ ($this->zero_fill($b, 15)));
return array($a,$b,$c);
}
function zero_fill ($a, $b) {
$z = hexdec(80000000);
if ($z & $a) {
$a = ($a >> 1);
$a &= (~$z);
$a |= 0x40000000;
$a = ($a >> ($b - 1));
} else {
$a = ($a >> $b);
}
return $a;
}