code: public static function encryptAndAppendTag($K, $IV, $P = null, $A = null, $tag_length = 128)
      {
          return implode(self::encrypt($K, $IV, $P, $A, $tag_length));
      }
docs: This method will append the tag at the end of the ciphertext.
  
  @param string      $K          Key encryption key
  @param string      $IV         Initialization vector
  @param null|string $P          Data to encrypt (null for authentication)
  @param null|string $A          Additional Authentication Data
  @param int         $tag_length Tag length
  
  @return string