protected function pack_int($int) {
        if (PHP_INT_SIZE === 8) {
            $left = 0xffffffff00000000;
            $right = 0x00000000ffffffff;
            $l = ($int & $left) >>32;
            $r = $int & $right;

            return pack('NN', $l, $r);
        } else {
            return pack('NN', 0, $int);
        }
    }