Protobuf\Binary\Platform\GmpNegativeEncoder::encodeSFixed64 PHP Метод

encodeSFixed64() публичный Метод

public encodeSFixed64 ( $sFixed64 )
    public function encodeSFixed64($sFixed64)
    {
        $value = $this->is32Bit ? gmp_and($sFixed64, '0x0ffffffffffffffff') : gmp_init(sprintf('%u', $sFixed64));
        $bytes = '';
        for ($i = 0; $i < 8; ++$i) {
            $bytes .= chr(gmp_intval(gmp_and($value, $this->gmp_xff)));
            $value = gmp_div_q($value, $this->gmp_x100);
        }
        return $bytes;
    }