private function parseSignedInt16()
    {
        try {
            $result = \unpack('n', $this->buffer)[1];

            if ($result & 0x8000) {
                return $result - 0x10000;
            }

            return $result;
        } finally {
            $this->buffer = mb_orig_substr($this->buffer, 2);
        }
    }
private function parseSignedInt16()
    {
        try {
            $result = \unpack('n', $this->buffer)[1];

            if ($result & 0x8000) {
                return $result - 0x10000;
            }

            return $result;
        } finally {
            $this->buffer = mb_orig_substr($this->buffer, 2);
        }
    }
private function parseSignedInt16 ( ) { try { $ result = \ unpack ( 'n' , $ this -> buffer ) [ 1 ] ; if ( $ result & 0x8000 ) { return $ result - 0x10000 ; } return $ result ; } finally { $ this -> buffer = mb_orig_substr ( $ this -> buffer , 2 ) ; } }
Parse a 16-bit signed integer from the head of the buffer.
@return int
Parse a 16 - bit signed integer from the head of the buffer .