<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension imap@8.2.31

namespace IMAP {
final class Connection {
}

}

namespace {
function imap_8bit(string $string) : false|string {}
function imap_alerts() : array|false {}
function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null) : bool {}
function imap_base64(string $string) : false|string {}
function imap_binary(string $string) : false|string {}
function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0) : false|string {}
function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $section) : \stdClass|false {}
function imap_check(\IMAP\Connection $imap) : \stdClass|false {}
function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : bool {}
function imap_close(\IMAP\Connection $imap, int $flags = 0) : bool {}
function imap_create(\IMAP\Connection $imap, string $mailbox) : bool {}
function imap_createmailbox(\IMAP\Connection $imap, string $mailbox) : bool {}
function imap_delete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : bool {}
function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox) : bool {}
function imap_errors() : array|false {}
function imap_expunge(\IMAP\Connection $imap) : bool {}
function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flags = 0) : array|false {}
function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0) : false|string {}
function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = 0) : false|string {}
function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0) : false|string {}
function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flags = 0) : \stdClass|false {}
function imap_fetchtext(\IMAP\Connection $imap, int $message_num, int $flags = 0) : false|string {}
function imap_gc(\IMAP\Connection $imap, int $flags) : bool {}
function imap_get_quota(\IMAP\Connection $imap, string $quota_root) : array|false {}
function imap_get_quotaroot(\IMAP\Connection $imap, string $mailbox) : array|false {}
function imap_getacl(\IMAP\Connection $imap, string $mailbox) : array|false {}
function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern) : array|false {}
function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $pattern) : array|false {}
function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_length = 0, int $subject_length = 0) : \stdClass|false {}
function imap_headers(\IMAP\Connection $imap) : array|false {}
function imap_is_open(\IMAP\Connection $imap) : bool {}
function imap_last_error() : false|string {}
function imap_list(\IMAP\Connection $imap, string $reference, string $pattern) : array|false {}
function imap_listmailbox(\IMAP\Connection $imap, string $reference, string $pattern) : array|false {}
function imap_listscan(\IMAP\Connection $imap, string $reference, string $pattern, string $content) : array|false {}
function imap_listsubscribed(\IMAP\Connection $imap, string $reference, string $pattern) : array|false {}
function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern) : array|false {}
function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null) : bool {}
function imap_mail_compose(array $envelope, array $bodies) : false|string {}
function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0) : bool {}
function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0) : bool {}
function imap_mailboxmsginfo(\IMAP\Connection $imap) : \stdClass {}
function imap_mime_header_decode(string $string) : array|false {}
function imap_msgno(\IMAP\Connection $imap, int $message_uid) : int {}
function imap_mutf7_to_utf8(string $string) : false|string {}
function imap_num_msg(\IMAP\Connection $imap) : false|int {}
function imap_num_recent(\IMAP\Connection $imap) : int {}
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) : \IMAP\Connection|false {}
function imap_ping(\IMAP\Connection $imap) : bool {}
function imap_qprint(string $string) : false|string {}
function imap_rename(\IMAP\Connection $imap, string $from, string $to) : bool {}
function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to) : bool {}
function imap_reopen(\IMAP\Connection $imap, string $mailbox, int $flags = 0, int $retries = 0) : bool {}
function imap_rfc822_parse_adrlist(string $string, string $default_hostname) : array {}
function imap_rfc822_parse_headers(string $headers, string $default_hostname = 'UNKNOWN') : \stdClass {}
function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal) : false|string {}
function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $section = '', int $flags = 0) : bool {}
function imap_scan(\IMAP\Connection $imap, string $reference, string $pattern, string $content) : array|false {}
function imap_scanmailbox(\IMAP\Connection $imap, string $reference, string $pattern, string $content) : array|false {}
function imap_search(\IMAP\Connection $imap, string $criteria, int $flags = \SE_FREE, string $charset = '') : array|false {}
function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox_size) : bool {}
function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, string $rights) : bool {}
function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : bool {}
function imap_sort(\IMAP\Connection $imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null) : array|false {}
function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags) : \stdClass|false {}
function imap_subscribe(\IMAP\Connection $imap, string $mailbox) : bool {}
function imap_thread(\IMAP\Connection $imap, int $flags = \SE_FREE) : array|false {}
function imap_timeout(int $timeout_type, int $timeout = -1) : bool|int {}
function imap_uid(\IMAP\Connection $imap, int $message_num) : false|int {}
function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : bool {}
function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox) : bool {}
function imap_utf7_decode(string $string) : false|string {}
function imap_utf7_encode(string $string) : string {}
function imap_utf8(string $mime_encoded_text) : string {}
function imap_utf8_to_mutf7(string $string) : false|string {}
const CL_EXPUNGE = 32768;
const CP_MOVE = 2;
const CP_UID = 1;
const ENC7BIT = 0;
const ENC8BIT = 1;
const ENCBASE64 = 3;
const ENCBINARY = 2;
const ENCOTHER = 5;
const ENCQUOTEDPRINTABLE = 4;
const FT_INTERNAL = 8;
const FT_NOT = 4;
const FT_PEEK = 2;
const FT_PREFETCHTEXT = 32;
const FT_UID = 1;
const IMAP_CLOSETIMEOUT = 4;
const IMAP_GC_ELT = 1;
const IMAP_GC_ENV = 2;
const IMAP_GC_TEXTS = 4;
const IMAP_OPENTIMEOUT = 1;
const IMAP_READTIMEOUT = 2;
const IMAP_WRITETIMEOUT = 3;
const LATT_HASCHILDREN = 32;
const LATT_HASNOCHILDREN = 64;
const LATT_MARKED = 4;
const LATT_NOINFERIORS = 1;
const LATT_NOSELECT = 2;
const LATT_REFERRAL = 16;
const LATT_UNMARKED = 8;
const NIL = 0;
const OP_ANONYMOUS = 4;
const OP_DEBUG = 1;
const OP_EXPUNGE = 128;
const OP_HALFOPEN = 64;
const OP_PROTOTYPE = 32;
const OP_READONLY = 2;
const OP_SECURE = 256;
const OP_SHORTCACHE = 8;
const OP_SILENT = 16;
const SA_ALL = 31;
const SA_MESSAGES = 1;
const SA_RECENT = 2;
const SA_UIDNEXT = 8;
const SA_UIDVALIDITY = 16;
const SA_UNSEEN = 4;
const SE_FREE = 2;
const SE_NOPREFETCH = 4;
const SE_UID = 1;
const SORTARRIVAL = 1;
const SORTCC = 5;
const SORTDATE = 0;
const SORTFROM = 2;
const SORTSIZE = 6;
const SORTSUBJECT = 3;
const SORTTO = 4;
const SO_FREE = 8;
const SO_NOSERVER = 8;
const ST_SET = 4;
const ST_SILENT = 2;
const ST_UID = 1;
const TYPEAPPLICATION = 3;
const TYPEAUDIO = 4;
const TYPEIMAGE = 5;
const TYPEMESSAGE = 2;
const TYPEMODEL = 7;
const TYPEMULTIPART = 1;
const TYPEOTHER = 8;
const TYPETEXT = 0;
const TYPEVIDEO = 6;
}
