summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/imap/php_imap.stub.php245
-rw-r--r--ext/imap/php_imap_arginfo.h172
-rw-r--r--ext/imap/tests/imap_body.phpt4
-rw-r--r--ext/imap/tests/imap_close_variation4.phpt10
-rw-r--r--ext/imap/tests/imap_fetch_overview_variation3.phpt8
-rw-r--r--ext/imap/tests/imap_fetchbody_variation4.phpt12
-rw-r--r--ext/imap/tests/imap_fetchbody_variation6.phpt18
-rw-r--r--ext/imap/tests/imap_fetchheader_variation3.phpt12
-rw-r--r--ext/imap/tests/imap_fetchheader_variation5.phpt18
-rw-r--r--ext/imap/tests/imap_fetchstructure_basic.phpt2
-rw-r--r--ext/imap/tests/imap_open_error.phpt4
11 files changed, 247 insertions, 258 deletions
diff --git a/ext/imap/php_imap.stub.php b/ext/imap/php_imap.stub.php
index 0a7adc2736..5505a60f6b 100644
--- a/ext/imap/php_imap.stub.php
+++ b/ext/imap/php_imap.stub.php
@@ -5,209 +5,208 @@
/**
* @return resource|false
*/
-function imap_open(string $mailbox, string $user, string $password, int $options = 0, int $n_retries = 0, array $params = []) {}
+function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) {}
/**
- * @param resource $stream_id
+ * @param resource $imap
*/
-function imap_reopen($stream_id, string $mailbox, int $options = 0, int $n_retries = 0): bool {}
+function imap_reopen($imap, string $mailbox, int $flags = 0, int $retries = 0): bool {}
/**
- * @param resource $stream_id
+ * @param resource $imap
*/
-function imap_close($stream_id, int $options = 0): bool {}
+function imap_close($imap, int $flags = 0): bool {}
-/** @param resource $stream_id */
-function imap_num_msg($stream_id): int|false {}
+/** @param resource $imap */
+function imap_num_msg($imap): int|false {}
-/** @param resource $stream_id */
-function imap_num_recent($stream_id): int|false {}
+/** @param resource $imap */
+function imap_num_recent($imap): int|false {}
-/** @param resource $stream_id */
-function imap_headers($stream_id): array|false {}
+/** @param resource $imap */
+function imap_headers($imap): array|false {}
-/** @param resource $stream_id */
-function imap_headerinfo($stream_id, int $msg_no, int $from_length = 0, int $subject_length = 0): stdClass|false {}
+/** @param resource $imap */
+function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $subject_length = 0): stdClass|false {}
-function imap_rfc822_parse_headers(string $headers, string $default_host = "UNKNOWN"): stdClass {}
+function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN"): stdClass {}
-function imap_rfc822_write_address(string $mailbox, string $host, string $personal): string|false {}
+function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal): string|false {}
-function imap_rfc822_parse_adrlist(string $address_string, string $default_host): array {}
+function imap_rfc822_parse_adrlist(string $string, string $default_hostname): array {}
-/** @param resource $stream_id */
-function imap_body($stream_id, int $msg_no, int $options = 0): string|false {}
+/** @param resource $imap */
+function imap_body($imap, int $message_num, int $flags = 0): string|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @alias imap_body
*/
-function imap_fetchtext($stream_id, int $msg_no, int $options = 0): string|false {}
+function imap_fetchtext($imap, int $message_num, int $flags = 0): string|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @return stdClass|false
*/
-function imap_bodystruct($stream_id, int $msg_no, string $section) {}
+function imap_bodystruct($imap, int $message_num, string $section) {}
-/** @param resource $stream_id */
-function imap_fetchbody($stream_id, int $msg_no, string $section, int $options = 0): string|false {}
+/** @param resource $imap */
+function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0): string|false {}
-/** @param resource $stream_id */
-function imap_fetchmime($stream_id, int $msg_no, string $section, int $options = 0): string|false {}
+/** @param resource $imap */
+function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0): string|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @param resource|string|int $file
*/
-function imap_savebody($stream_id, $file, int $msg_no, string $section = "", int $options = 0): bool {}
+function imap_savebody($imap, $file, int $message_num, string $section = "", int $flags = 0): bool {}
-/** @param resource $stream_id */
-function imap_fetchheader($stream_id, int $msg_no, int $options = 0): string|false {}
+/** @param resource $imap */
+function imap_fetchheader($imap, int $message_num, int $flags = 0): string|false {}
-/** @param resource $stream_id */
-function imap_fetchstructure($stream_id, int $msg_no, int $options = 0): stdClass|false {}
+/** @param resource $imap */
+function imap_fetchstructure($imap, int $message_num, int $flags = 0): stdClass|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
*/
-function imap_gc($stream_id, int $flags): bool {}
+function imap_gc($imap, int $flags): bool {}
/**
- * @param resource $stream_id
+ * @param resource $imap
*/
-function imap_expunge($stream_id): bool {}
+function imap_expunge($imap): bool {}
/**
- * @param resource $stream_id
+ * @param resource $imap
*/
-function imap_delete($stream_id, string $msg_no, int $options = 0): bool {}
+function imap_delete($imap, string $message_num, int $flags = 0): bool {}
/**
- * @param resource $stream_id
+ * @param resource $imap
*/
-function imap_undelete($stream_id, string $msg_no, int $options = 0): bool {}
+function imap_undelete($imap, string $message_num, int $flags = 0): bool {}
-/** @param resource $stream_id */
-function imap_check($stream_id): stdClass|false {}
+/** @param resource $imap */
+function imap_check($imap): stdClass|false {}
-/** @param resource $stream_id */
-function imap_listscan($stream_id, string $ref, string $pattern, string $content): array|false {}
+/** @param resource $imap */
+function imap_listscan($imap, string $reference, string $pattern, string $content): array|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @alias imap_listscan
*/
-function imap_scan($stream_id, string $ref, string $pattern, string $content): array|false {}
+function imap_scan($imap, string $reference, string $pattern, string $content): array|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @alias imap_listscan
*/
-function imap_scanmailbox($stream_id, string $ref, string $pattern, string $content): array|false {}
+function imap_scanmailbox($imap, string $reference, string $pattern, string $content): array|false {}
-/** @param resource $stream_id */
-function imap_mail_copy($stream_id, string $msglist, string $mailbox, int $options = 0): bool {}
+/** @param resource $imap */
+function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
-/** @param resource $stream_id */
-function imap_mail_move($stream_id, string $sequence, string $mailbox, int $options = 0): bool {}
+/** @param resource $imap */
+function imap_mail_move($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
function imap_mail_compose(array $envelope, array $body): string|false {}
-/** @param resource $stream_id */
-function imap_createmailbox($stream_id, string $mailbox): bool {}
+/** @param resource $imap */
+function imap_createmailbox($imap, string $mailbox): bool {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @alias imap_createmailbox
*/
-function imap_create($stream_id, string $mailbox): bool {}
+function imap_create($imap, string $mailbox): bool {}
-/** @param resource $stream_id */
-function imap_renamemailbox($stream_id, string $old_name, string $new_name): bool {}
+/** @param resource $imap */
+function imap_renamemailbox($imap, string $from, string $to): bool {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @alias imap_renamemailbox
*/
-function imap_rename($stream_id, string $old_name, string $new_name): bool {}
+function imap_rename($imap, string $from, string $to): bool {}
-/** @param resource $stream_id */
-function imap_deletemailbox($stream_id, string $mailbox): bool {}
+/** @param resource $imap */
+function imap_deletemailbox($imap, string $mailbox): bool {}
-/** @param resource $stream_id */
-function imap_subscribe($stream_id, string $mailbox): bool {}
+/** @param resource $imap */
+function imap_subscribe($imap, string $mailbox): bool {}
-/** @param resource $stream_id */
-function imap_unsubscribe($stream_id, string $mailbox): bool {}
+/** @param resource $imap */
+function imap_unsubscribe($imap, string $mailbox): bool {}
-/** @param resource $stream_id */
-function imap_append($stream_id, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
+/** @param resource $imap */
+function imap_append($imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
-/** @param resource $stream_id */
-function imap_ping($stream_id): bool {}
+/** @param resource $imap */
+function imap_ping($imap): bool {}
-function imap_base64(string $text): string|false {}
+function imap_base64(string $string): string|false {}
-function imap_qprint(string $text): string|false {}
+function imap_qprint(string $string): string|false {}
-function imap_8bit(string $text): string|false {}
-
-function imap_binary(string $text): string|false {}
+function imap_8bit(string $string): string|false {}
+function imap_binary(string $string): string|false {}
function imap_utf8(string $mime_encoded_text): string {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @return stdClass|false
*/
-function imap_status($stream_id, string $mailbox, int $options) {}
+function imap_status($imap, string $mailbox, int $flags) {}
-/** @param resource $stream_id */
-function imap_mailboxmsginfo($stream_id): stdClass {}
+/** @param resource $imap */
+function imap_mailboxmsginfo($imap): stdClass {}
-/** @param resource $stream_id */
-function imap_setflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}
+/** @param resource $imap */
+function imap_setflag_full($imap, string $sequence, string $flag, int $options = 0): bool {}
-/** @param resource $stream_id */
-function imap_clearflag_full($stream_id, string $sequence, string $flag, int $options = 0): bool {}
+/** @param resource $imap */
+function imap_clearflag_full($imap, string $sequence, string $flag, int $options = 0): bool {}
-/** @param resource $stream_id */
-function imap_sort($stream_id, int $criteria, int $reverse, int $options = 0, ?string $search_criteria = null, ?string $charset = null): array|false {}
+/** @param resource $imap */
+function imap_sort($imap, int $criteria, int $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array|false {}
-/** @param resource $stream_id */
-function imap_uid($stream_id, int $msg_no): int|false {}
+/** @param resource $imap */
+function imap_uid($imap, int $message_num): int|false {}
-/** @param resource $stream_id */
-function imap_msgno($stream_id, int $unique_msg_id): int|false {}
+/** @param resource $imap */
+function imap_msgno($imap, int $message_uid): int|false {}
-/** @param resource $stream_id */
-function imap_list($stream_id, string $ref, string $pattern): array|false {}
+/** @param resource $imap */
+function imap_list($imap, string $reference, string $pattern): array|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @alias imap_list
*/
-function imap_listmailbox($stream_id, string $ref, string $pattern): array|false {}
+function imap_listmailbox($imap, string $reference, string $pattern): array|false {}
-/** @param resource $stream_id */
-function imap_lsub($stream_id, string $ref, string $pattern): array|false {}
+/** @param resource $imap */
+function imap_lsub($imap, string $reference, string $pattern): array|false {}
/**
- * @param resource $stream_id
+ * @param resource $imap
* @alias imap_lsub
*/
-function imap_listsubscribed($stream_id, string $ref, string $pattern): array|false {}
+function imap_listsubscribed($imap, string $reference, string $pattern): array|false {}
-/** @param resource $stream_id */
-function imap_getsubscribed($stream_id, string $ref, string $pattern): array|false {}
+/** @param resource $imap */
+function imap_getsubscribed($imap, string $reference, string $pattern): array|false {}
-/** @param resource $stream_id */
-function imap_getmailboxes($stream_id, string $ref, string $pattern): array|false {}
+/** @param resource $imap */
+function imap_getmailboxes($imap, string $reference, string $pattern): array|false {}
-/** @param resource $stream_id */
-function imap_fetch_overview($stream_id, string $sequence, int $options = 0): array|false {}
+/** @param resource $imap */
+function imap_fetch_overview($imap, string $sequence, int $flags = 0): array|false {}
function imap_alerts(): array|false {}
@@ -215,41 +214,41 @@ function imap_errors(): array|false {}
function imap_last_error(): string|false {}
-/** @param resource $stream_id */
-function imap_search($stream_id, string $criteria, int $options = SE_FREE, string $charset = ""): array|false {}
+/** @param resource $imap */
+function imap_search($imap, string $criteria, int $flags = SE_FREE, string $charset = ""): array|false {}
-function imap_utf7_decode(string $buf): string|false {}
+function imap_utf7_decode(string $string): string|false {}
-function imap_utf7_encode(string $buf): string {}
+function imap_utf7_encode(string $string): string {}
#ifdef HAVE_IMAP_MUTF7
-function imap_utf8_to_mutf7(string $in): string|false {}
+function imap_utf8_to_mutf7(string $string): string|false {}
-function imap_mutf7_to_utf8(string $in): string|false {}
+function imap_mutf7_to_utf8(string $string): string|false {}
#endif
-function imap_mime_header_decode(string $str): array|false {}
+function imap_mime_header_decode(string $string): array|false {}
-/** @param resource $stream_id */
-function imap_thread($stream_id, int $options = SE_FREE): array|false {}
+/** @param resource $imap */
+function imap_thread($imap, int $flags = SE_FREE): array|false {}
function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-/** @param resource $stream_id */
-function imap_get_quota($stream_id, string $qroot): array|false {}
+/** @param resource $imap */
+function imap_get_quota($imap, string $quota_root): array|false {}
-/** @param resource $stream_id */
-function imap_get_quotaroot($stream_id, string $mbox): array|false {}
+/** @param resource $imap */
+function imap_get_quotaroot($imap, string $mailbox): array|false {}
-/** @param resource $stream_id */
-function imap_set_quota($stream_id, string $qroot, int $mailbox_size): bool {}
+/** @param resource $imap */
+function imap_set_quota($imap, string $quota_root, int $mailbox_size): bool {}
-/** @param resource $stream_id */
-function imap_setacl($stream_id, string $mailbox, string $id, string $rights): bool {}
+/** @param resource $imap */
+function imap_setacl($imap, string $mailbox, string $user_id, string $rights): bool {}
-/** @param resource $stream_id */
-function imap_getacl($stream_id, string $mailbox): array|false {}
+/** @param resource $imap */
+function imap_getacl($imap, string $mailbox): array|false {}
#endif
-function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $rpath = null): bool {}
+function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null): bool {}
diff --git a/ext/imap/php_imap_arginfo.h b/ext/imap/php_imap_arginfo.h
index ffb60a034f..22bf62ffb2 100644
--- a/ext/imap/php_imap_arginfo.h
+++ b/ext/imap/php_imap_arginfo.h
@@ -1,123 +1,123 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: e501d6869d721ad720a1a7c8b597b96e9591d5ed */
+ * Stub hash: 621ebf610e043ce30c981f4c78ab79358c2aaeb9 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_open, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, user, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, n_retries, IS_LONG, 0, "0")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_reopen, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, n_retries, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_close, 0, 1, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_num_msg, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()
#define arginfo_imap_num_recent arginfo_imap_num_msg
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_headerinfo, 0, 2, stdClass, MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, from_length, IS_LONG, 0, "0")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, subject_length, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_rfc822_parse_headers, 0, 1, stdClass, 0)
ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, default_host, IS_STRING, 0, "\"UNKNOWN\"")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, default_hostname, IS_STRING, 0, "\"UNKNOWN\"")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_rfc822_write_address, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, personal, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_rfc822_parse_adrlist, 0, 2, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO(0, address_string, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, default_host, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, default_hostname, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_body, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#define arginfo_imap_fetchtext arginfo_imap_body
ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_bodystruct, 0, 0, 3)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetchbody, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, section, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#define arginfo_imap_fetchmime arginfo_imap_fetchbody
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_savebody, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_INFO(0, file)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, section, IS_STRING, 0, "\"\"")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#define arginfo_imap_fetchheader arginfo_imap_body
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_fetchstructure, 0, 2, stdClass, MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_gc, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_expunge, 0, 1, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_delete, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#define arginfo_imap_undelete arginfo_imap_delete
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_check, 0, 1, stdClass, MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_listscan, 0, 4, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, ref, IS_STRING, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, reference, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -127,18 +127,13 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_scanmailbox arginfo_imap_listscan
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_copy, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msglist, IS_STRING, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_nums, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail_move, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
-ZEND_END_ARG_INFO()
+#define arginfo_imap_mail_move arginfo_imap_mail_copy
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mail_compose, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, envelope, IS_ARRAY, 0)
@@ -146,16 +141,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mail_compose, 0, 2, MAY_BE_
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_createmailbox, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_imap_create arginfo_imap_createmailbox
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_renamemailbox, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, old_name, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, new_name, IS_STRING, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, from, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_imap_rename arginfo_imap_renamemailbox
@@ -167,7 +162,7 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_unsubscribe arginfo_imap_createmailbox
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_append, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, folder, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null")
@@ -177,7 +172,7 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_ping arginfo_imap_expunge
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_base64, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_imap_qprint arginfo_imap_base64
@@ -191,17 +186,17 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_utf8, 0, 1, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_status, 0, 0, 3)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_imap_mailboxmsginfo, 0, 1, stdClass, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_setflag_full, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, flag, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
@@ -210,27 +205,27 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_clearflag_full arginfo_imap_setflag_full
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_sort, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, criteria, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, reverse, IS_LONG, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, search_criteria, IS_STRING, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_uid, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, msg_no, IS_LONG, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_msgno, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, unique_msg_id, IS_LONG, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, message_uid, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_list, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, ref, IS_STRING, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, reference, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
ZEND_END_ARG_INFO()
@@ -245,9 +240,9 @@ ZEND_END_ARG_INFO()
#define arginfo_imap_getmailboxes arginfo_imap_list
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_fetch_overview, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, sequence, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_alerts, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
@@ -259,23 +254,21 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_last_error, 0, 0, MAY_BE_ST
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_search, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, criteria, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "SE_FREE")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SE_FREE")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 0, "\"\"")
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_utf7_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0)
-ZEND_END_ARG_INFO()
+#define arginfo_imap_utf7_decode arginfo_imap_base64
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_utf7_encode, 0, 1, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, buf, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
#if defined(HAVE_IMAP_MUTF7)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_utf8_to_mutf7, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO(0, in, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
@@ -284,12 +277,12 @@ ZEND_END_ARG_INFO()
#endif
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_mime_header_decode, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_thread, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "SE_FREE")
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "SE_FREE")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_timeout, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)
@@ -299,40 +292,37 @@ ZEND_END_ARG_INFO()
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quota, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, qroot, IS_STRING, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, quota_root, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_get_quotaroot, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, mbox, IS_STRING, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_set_quota, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, qroot, IS_STRING, 0)
+ ZEND_ARG_INFO(0, imap)
+ ZEND_ARG_TYPE_INFO(0, quota_root, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mailbox_size, IS_LONG, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_setacl, 0, 4, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, stream_id)
+ ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, user_id, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, rights, IS_STRING, 0)
ZEND_END_ARG_INFO()
#endif
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_getacl, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, stream_id)
- ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
-ZEND_END_ARG_INFO()
+#define arginfo_imap_getacl arginfo_imap_get_quotaroot
#endif
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail, 0, 3, _IS_BOOL, 0)
@@ -342,7 +332,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_mail, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_headers, IS_STRING, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cc, IS_STRING, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bcc, IS_STRING, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rpath, IS_STRING, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, return_path, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()
diff --git a/ext/imap/tests/imap_body.phpt b/ext/imap/tests/imap_body.phpt
index 752ca1c39d..6c2f629398 100644
--- a/ext/imap/tests/imap_body.phpt
+++ b/ext/imap/tests/imap_body.phpt
@@ -32,8 +32,8 @@ imap_close($stream_id);
?>
--EXPECTF--
-imap_body(): Argument #2 ($msg_no) must be greater than 0
-imap_body(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
+imap_body(): Argument #2 ($message_num) must be greater than 0
+imap_body(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
Warning: imap_body(): UID does not exist in %s on line %d
bool(false)
diff --git a/ext/imap/tests/imap_close_variation4.phpt b/ext/imap/tests/imap_close_variation4.phpt
index 56e3722e9e..b57f607f88 100644
--- a/ext/imap/tests/imap_close_variation4.phpt
+++ b/ext/imap/tests/imap_close_variation4.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test imap_close() function : usage variations - different ints as $options arg
+Test imap_close() function : usage variations - different ints as $flags arg
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Pass different integers as $options arg to imap_close() to test which are
+ * Pass different integers as $flags arg to imap_close() to test which are
* recognised as CL_EXPUNGE option
*/
@@ -76,10 +76,10 @@ bool(true)
CL_EXPUNGE was set
-- Iteration 3 --
-imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
+imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
-- Iteration 4 --
-imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
+imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
-- Iteration 5 --
-imap_close(): Argument #2 ($options) must be CL_EXPUNGE or 0
+imap_close(): Argument #2 ($flags) must be CL_EXPUNGE or 0
diff --git a/ext/imap/tests/imap_fetch_overview_variation3.phpt b/ext/imap/tests/imap_fetch_overview_variation3.phpt
index 68d8d20ce4..f416887388 100644
--- a/ext/imap/tests/imap_fetch_overview_variation3.phpt
+++ b/ext/imap/tests/imap_fetch_overview_variation3.phpt
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Test passing a range of values into the $options argument to imap_fetch_overview():
+ * Test passing a range of values into the $flags argument to imap_fetch_overview():
* 1. values that equate to 1
* 2. Minimum and maximum PHP values
*/
@@ -21,7 +21,7 @@ $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one sim
$msg_no = 1;
$msg_uid = imap_uid($stream_id, $msg_no);
-$options = array ('1',
+$flags = array ('1',
true,
1.000000000000001,
0.00001e5,
@@ -29,7 +29,7 @@ $options = array ('1',
);
imap_check($stream_id);
-foreach($options as $option) {
+foreach($flags as $option) {
echo "\nTesting with option value:";
var_dump($option);
try {
@@ -65,4 +65,4 @@ Testing with option value:float(1)
imap_fetch_overview() returns an object
Testing with option value:int(245)
-imap_fetch_overview(): Argument #3 ($options) must be FT_UID or 0
+imap_fetch_overview(): Argument #3 ($flags) must be FT_UID or 0
diff --git a/ext/imap/tests/imap_fetchbody_variation4.phpt b/ext/imap/tests/imap_fetchbody_variation4.phpt
index 510e78fd31..df5d895670 100644
--- a/ext/imap/tests/imap_fetchbody_variation4.phpt
+++ b/ext/imap/tests/imap_fetchbody_variation4.phpt
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Test if FT_UID is set by passing the following as $options argument to imap_fetchbody():
+ * Test if FT_UID is set by passing the following as $flags argument to imap_fetchbody():
* 1. values that equate to 1
* 2. Minimum and maximum PHP values
*/
@@ -22,14 +22,14 @@ $msg_uid = imap_uid($stream_id, $msg_no);
$section = 1;
//Note: the first four values are valid as they will all be cast to 1L.
-$options = array ('1', true,
+$flags = array ('1', true,
1.000000000000001, 0.00001e5,
PHP_INT_MAX, -PHP_INT_MAX);
-// iterate over each element of $options array to test whether FT_UID is set
+// iterate over each element of $flags array to test whether FT_UID is set
$iterator = 1;
imap_check($stream_id);
-foreach($options as $option) {
+foreach($flags as $option) {
echo "\n-- Iteration $iterator --\n";
try {
@@ -67,7 +67,7 @@ FT_UID valid
FT_UID valid
-- Iteration 5 --
-imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
+imap_fetchbody(): Argument #4 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
-- Iteration 6 --
-imap_fetchbody(): Argument #4 ($options) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
+imap_fetchbody(): Argument #4 ($flags) must be a bitmask of FT_UID, FT_PEEK, and FT_INTERNAL
diff --git a/ext/imap/tests/imap_fetchbody_variation6.phpt b/ext/imap/tests/imap_fetchbody_variation6.phpt
index a99f7950eb..8b3d73540a 100644
--- a/ext/imap/tests/imap_fetchbody_variation6.phpt
+++ b/ext/imap/tests/imap_fetchbody_variation6.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test imap_fetchbody() function : usage variations - $msg_no arg
+Test imap_fetchbody() function : usage variations - $message_num arg
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Pass different integers, strings, msg sequences and msg UIDs as $msg_no argument
+ * Pass different integers, strings, msg sequences and msg UIDs as $message_num argument
* to test behaviour of imap_fetchbody()
*/
@@ -21,10 +21,10 @@ $section = 1;
$sequences = [0, /* out of range */ 4, 1];
-foreach($sequences as $msg_no) {
- echo "\n-- \$msg_no is $msg_no --\n";
+foreach($sequences as $message_num) {
+ echo "\n-- \$message_num is $message_num --\n";
try {
- var_dump(imap_fetchbody($stream_id, $msg_no, $section));
+ var_dump(imap_fetchbody($stream_id, $message_num, $section));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
@@ -39,14 +39,14 @@ require_once(__DIR__.'/clean.inc');
Create a temporary mailbox and add 3 msgs
.. mailbox '{%s}%s' created
--- $msg_no is 0 --
-imap_fetchbody(): Argument #2 ($msg_no) must be greater than 0
+-- $message_num is 0 --
+imap_fetchbody(): Argument #2 ($message_num) must be greater than 0
--- $msg_no is 4 --
+-- $message_num is 4 --
Warning: imap_fetchbody(): Bad message number in %s on line %d
bool(false)
--- $msg_no is 1 --
+-- $message_num is 1 --
string(%s) "1: this is a test message, please ignore
%A"
diff --git a/ext/imap/tests/imap_fetchheader_variation3.phpt b/ext/imap/tests/imap_fetchheader_variation3.phpt
index 9391393782..a457db0491 100644
--- a/ext/imap/tests/imap_fetchheader_variation3.phpt
+++ b/ext/imap/tests/imap_fetchheader_variation3.phpt
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Test if FT_UID is set by passing the following as $options argument to imap_fetchheader():
+ * Test if FT_UID is set by passing the following as $flags argument to imap_fetchheader():
* 1. values that equate to 1
* 2. Minimum and maximum PHP values
*/
@@ -21,14 +21,14 @@ $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one sim
$msg_no = 1;
$msg_uid = imap_uid($stream_id, $msg_no);
-$options = array ('1', true,
+$flags = array ('1', true,
1.000000000000001, 0.00001e5,
PHP_INT_MAX, -PHP_INT_MAX);
-// iterate over each element of $options array to test whether FT_UID is set
+// iterate over each element of $flags array to test whether FT_UID is set
$iterator = 1;
imap_check($stream_id);
-foreach($options as $option) {
+foreach($flags as $option) {
echo "\n-- Iteration $iterator --\n";
try {
if (is_string(imap_fetchheader($stream_id, $msg_uid, $option))) {
@@ -64,7 +64,7 @@ FT_UID valid
FT_UID valid
-- Iteration 5 --
-imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
+imap_fetchheader(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
-- Iteration 6 --
-imap_fetchheader(): Argument #3 ($options) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
+imap_fetchheader(): Argument #3 ($flags) must be a bitmask of FT_UID, FT_PREFETCHTEXT, and FT_INTERNAL
diff --git a/ext/imap/tests/imap_fetchheader_variation5.phpt b/ext/imap/tests/imap_fetchheader_variation5.phpt
index e6e641632f..cb00986a06 100644
--- a/ext/imap/tests/imap_fetchheader_variation5.phpt
+++ b/ext/imap/tests/imap_fetchheader_variation5.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test imap_fetchheader() function : usage variations - $msg_no argument
+Test imap_fetchheader() function : usage variations - $message_num argument
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
@@ -7,7 +7,7 @@ require_once(__DIR__.'/skipif.inc');
--FILE--
<?php
/*
- * Pass different integers and strings as $msg_no argument
+ * Pass different integers and strings as $message_num argument
* to test behaviour of imap_fetchheader()
*/
@@ -19,10 +19,10 @@ $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp ma
$sequences = [0, /* out of range */ 4, 1];
-foreach($sequences as $msg_no) {
- echo "\n-- \$msg_no is $msg_no --\n";
+foreach($sequences as $message_num) {
+ echo "\n-- \$message_num is $message_num --\n";
try {
- var_dump(imap_fetchheader($stream_id, $msg_no));
+ var_dump(imap_fetchheader($stream_id, $message_num));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
@@ -40,15 +40,15 @@ require_once(__DIR__.'/clean.inc');
Create a temporary mailbox and add 3 msgs
.. mailbox '{%s}%s' created
--- $msg_no is 0 --
-imap_fetchheader(): Argument #2 ($msg_no) must be greater than 0
+-- $message_num is 0 --
+imap_fetchheader(): Argument #2 ($message_num) must be greater than 0
--- $msg_no is 4 --
+-- $message_num is 4 --
Warning: imap_fetchheader(): Bad message number in %s on line %d
bool(false)
--- $msg_no is 1 --
+-- $message_num is 1 --
string(%d) "From: foo@anywhere.com
Subject: Test msg 1
To: %s
diff --git a/ext/imap/tests/imap_fetchstructure_basic.phpt b/ext/imap/tests/imap_fetchstructure_basic.phpt
index 11c1f7efb2..24cd2307dd 100644
--- a/ext/imap/tests/imap_fetchstructure_basic.phpt
+++ b/ext/imap/tests/imap_fetchstructure_basic.phpt
@@ -43,7 +43,7 @@ require_once('clean.inc');
--EXPECTF--
Create a temporary mailbox and add 1 msgs
.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created
-imap_fetchstructure(): Argument #2 ($msg_no) must be greater than 0
+imap_fetchstructure(): Argument #2 ($message_num) must be greater than 0
bool(true)
bool(true)
bool(true)
diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt
index fe59a6a25e..be1063fadc 100644
--- a/ext/imap/tests/imap_open_error.phpt
+++ b/ext/imap/tests/imap_open_error.phpt
@@ -33,7 +33,7 @@ try {
Checking with incorrect parameters
Warning: imap_open(): Couldn't open stream in %s on line %d
-imap_open(): Argument #4 ($options) must be a bitmask of the OP_* constants, and CL_EXPUNGE
-imap_open(): Argument #5 ($n_retries) must be greater than or equal to 0
+imap_open(): Argument #4 ($flags) must be a bitmask of the OP_* constants, and CL_EXPUNGE
+imap_open(): Argument #5 ($retries) must be greater than or equal to 0
Notice: Unknown: Can't open mailbox : no such mailbox (errflg=2) in Unknown on line 0