From d02fc96b359de0e6e93bd4e74171acfb7be304ba Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Sep 2020 16:14:26 +0200 Subject: [PATCH 1/3] Update mbstring names --- ext/mbstring/mbstring.stub.php | 42 +++++++++---------- ext/mbstring/mbstring_arginfo.h | 40 +++++++++--------- ext/mbstring/tests/bug79149.phpt | 6 +-- ext/mbstring/tests/mb_convert_encoding.phpt | 2 +- ..._convert_encoding_empty_encoding_list.phpt | 4 +- ...convert_variables_empty_encoding_list.phpt | 4 +- .../tests/mb_decode_numericentity.phpt | 2 +- .../tests/mb_encode_numericentity.phpt | 2 +- .../tests/mb_str_split_error_conditions.phpt | 4 +- .../tests/mb_str_unknown_encoding.phpt | 2 +- ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 4 +- .../tests/strings/str_split_variation6.phpt | 6 +-- .../tests/strings/str_split_variation7.phpt | 6 +-- 14 files changed, 63 insertions(+), 63 deletions(-) diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index be54303896285..0348e13cfb660 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -21,7 +21,7 @@ function mb_parse_str(string $encoded_string, &$result): bool {} function mb_output_handler(string $contents, int $status): string {} -function mb_str_split(string $string, int $split_length = 1, ?string $encoding = null): array {} +function mb_str_split(string $string, int $length = 1, ?string $encoding = null): array {} function mb_strlen(string $string, ?string $encoding = null): int {} @@ -33,13 +33,13 @@ function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $ function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {} -function mb_strstr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} -function mb_strrchr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} -function mb_stristr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} -function mb_strrichr(string $haystack, string $needle, bool $part = false, ?string $encoding = null): string|false {} +function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {} function mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int {} @@ -51,7 +51,7 @@ function mb_strwidth(string $string, ?string $encoding = null): int {} function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = "", ?string $encoding = null): string {} -function mb_convert_encoding(array|string $string, string $to, array|string|null $from = null): array|string|false {} +function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false {} function mb_convert_case(string $string, int $mode, ?string $encoding = null): string {} @@ -65,29 +65,29 @@ function mb_list_encodings(): array {} function mb_encoding_aliases(string $encoding): array {} -function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer = null, string $linefeed = "\r\n", int $indent = 0): string {} +function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer_encoding = null, string $linefeed = "\r\n", int $indent = 0): string {} function mb_decode_mimeheader(string $string): string {} -function mb_convert_kana(string $string, string $option = "KV", ?string $encoding = null): string {} +function mb_convert_kana(string $string, string $mode = "KV", ?string $encoding = null): string {} -function mb_convert_variables(string $to, array|string $from, mixed &$var, mixed &...$vars): string|false {} +function mb_convert_variables(string $to_encoding, array|string $from_encoding, mixed &$var, mixed &...$vars): string|false {} -function mb_encode_numericentity(string $string, array $convmap, ?string $encoding = null, bool $is_hex = false): string {} +function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $use_hex = false): string {} -function mb_decode_numericentity(string $string, array $convmap, ?string $encoding = null): string {} +function mb_decode_numericentity(string $string, array $map, ?string $encoding = null): string {} function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_parameters = null): bool {} function mb_get_info(string $type = "all"): array|string|int|false {} -function mb_check_encoding(array|string|null $var = null, ?string $encoding = null): bool {} +function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool {} function mb_scrub(string $string, ?string $encoding = null): string {} function mb_ord(string $string, ?string $encoding = null): int|false {} -function mb_chr(int $cp, ?string $encoding = null): string|false {} +function mb_chr(int $codepoint, ?string $encoding = null): string|false {} #ifdef HAVE_MBREGEX function mb_regex_encoding(?string $encoding = null): string|bool {} @@ -98,23 +98,23 @@ function mb_ereg(string $pattern, string $string, &$registers = null): int|false /** @param array $registers */ function mb_eregi(string $pattern, string $string, &$registers = null): int|false {} -function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $option = null): string|false|null {} +function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {} -function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $option = null): string|false|null {} +function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {} -function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $option = null): string|false|null {} +function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {} function mb_split(string $pattern, string $string, int $limit = -1): array|false {} -function mb_ereg_match(string $pattern, string $string, ?string $option = null): bool {} +function mb_ereg_match(string $pattern, string $string, ?string $options = null): bool {} -function mb_ereg_search(?string $pattern = null, ?string $option = null): bool {} +function mb_ereg_search(?string $pattern = null, ?string $options = null): bool {} -function mb_ereg_search_pos(?string $pattern = null, ?string $option = null): array|false {} +function mb_ereg_search_pos(?string $pattern = null, ?string $options = null): array|false {} -function mb_ereg_search_regs(?string $pattern = null, ?string $option = null): array|false {} +function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): array|false {} -function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $option = null): bool {} +function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null): bool {} function mb_ereg_search_getregs(): array|false {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 6e71343ce4323..636513783cf06 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 85cabf678a06175d4da073be79a0951d4f3786ed */ + * Stub hash: 78f2c0279d16ea58c551260b84d3504177ae4733 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null") @@ -39,7 +39,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, split_length, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -64,7 +64,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, part, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, before_needle, _IS_BOOL, 0, "false") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -101,8 +101,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_encoding, 0, 2, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_MASK(0, string, MAY_BE_ARRAY|MAY_BE_STRING, NULL) - ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_INFO(0, to_encoding, IS_STRING, 0) + ZEND_ARG_TYPE_MASK(0, from_encoding, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_case, 0, 2, IS_STRING, 0) @@ -134,7 +134,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_mimeheader, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, transfer, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, transfer_encoding, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, linefeed, IS_STRING, 0, "\"\\r\\n\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, indent, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -145,27 +145,27 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_convert_kana, 0, 1, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 0, "\"KV\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"KV\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_variables, 0, 3, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_INFO(0, to_encoding, IS_STRING, 0) + ZEND_ARG_TYPE_MASK(0, from_encoding, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO(1, var, IS_MIXED, 0) ZEND_ARG_VARIADIC_TYPE_INFO(1, vars, IS_MIXED, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_numericentity, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, map, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_hex, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_hex, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_decode_numericentity, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, convmap, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, map, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -182,7 +182,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY| ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_check_encoding, 0, 0, _IS_BOOL, 0) - ZEND_ARG_TYPE_MASK(0, var, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -194,7 +194,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ord, 0, 1, MAY_BE_LONG|MAY_BE ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_chr, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO(0, cp, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, codepoint, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -221,7 +221,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace, 0, 3, MAY_BE_ST ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, replacement, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -234,7 +234,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace_callback, 0, 3, ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -250,21 +250,21 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_match, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_MBREGEX) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif #if defined(HAVE_MBREGEX) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search_pos, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif @@ -276,7 +276,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_init, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, option, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #endif diff --git a/ext/mbstring/tests/bug79149.phpt b/ext/mbstring/tests/bug79149.phpt index c057ed0ad7d0f..b8a7bb0e3c5eb 100644 --- a/ext/mbstring/tests/bug79149.phpt +++ b/ext/mbstring/tests/bug79149.phpt @@ -24,8 +24,8 @@ try { ?> --EXPECTF-- -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "0" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "0" Warning: Array to string conversion in %s on line %d -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "Array" -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "foo" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "Array" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "foo" diff --git a/ext/mbstring/tests/mb_convert_encoding.phpt b/ext/mbstring/tests/mb_convert_encoding.phpt index 40b1dfed882b3..1f39d21b15ca8 100644 --- a/ext/mbstring/tests/mb_convert_encoding.phpt +++ b/ext/mbstring/tests/mb_convert_encoding.phpt @@ -124,4 +124,4 @@ JIS: GyRCRnxLXDhsJUYlLSU5JUgkRyQ5ISMbKEIwMTIzNBskQiM1IzYjNyM4IzkhIxsoQg== == INVALID PARAMETER == INT: 1234 EUC-JP: -mb_convert_encoding(): Argument #2 ($to) must be a valid encoding, "BAD" given +mb_convert_encoding(): Argument #2 ($to_encoding) must be a valid encoding, "BAD" given diff --git a/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt b/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt index 7b7d8217c3b0b..6fe5adbc35f11 100644 --- a/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt +++ b/ext/mbstring/tests/mb_convert_encoding_empty_encoding_list.phpt @@ -23,5 +23,5 @@ try { ?> --EXPECT-- -mb_convert_encoding(): Argument #3 ($from) must specify at least one encoding -mb_convert_encoding(): Argument #3 ($from) must specify at least one encoding +mb_convert_encoding(): Argument #3 ($from_encoding) must specify at least one encoding +mb_convert_encoding(): Argument #3 ($from_encoding) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt b/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt index 4dbbd9f26ffed..29807bfa384d7 100644 --- a/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt +++ b/ext/mbstring/tests/mb_convert_variables_empty_encoding_list.phpt @@ -22,5 +22,5 @@ try { ?> --EXPECT-- -mb_convert_variables(): Argument #2 ($from) must specify at least one encoding -mb_convert_variables(): Argument #2 ($from) must specify at least one encoding +mb_convert_variables(): Argument #2 ($from_encoding) must specify at least one encoding +mb_convert_variables(): Argument #2 ($from_encoding) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_decode_numericentity.phpt b/ext/mbstring/tests/mb_decode_numericentity.phpt index 91b324924774a..b28a875f8a77f 100644 --- a/ext/mbstring/tests/mb_decode_numericentity.phpt +++ b/ext/mbstring/tests/mb_decode_numericentity.phpt @@ -49,4 +49,4 @@ aŒbœcŠdše€fg � � föo -mb_decode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements +mb_decode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements diff --git a/ext/mbstring/tests/mb_encode_numericentity.phpt b/ext/mbstring/tests/mb_encode_numericentity.phpt index f7e8002383a2b..417b099f65c25 100644 --- a/ext/mbstring/tests/mb_encode_numericentity.phpt +++ b/ext/mbstring/tests/mb_encode_numericentity.phpt @@ -31,4 +31,4 @@ try { ƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦ aŒbœcŠdše€fg föo -mb_encode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements +mb_encode_numericentity(): Argument #2 ($map) must have a multiple of 4 elements diff --git a/ext/mbstring/tests/mb_str_split_error_conditions.phpt b/ext/mbstring/tests/mb_str_split_error_conditions.phpt index 77f04aad09cd7..b1b56672f3d01 100644 --- a/ext/mbstring/tests/mb_str_split_error_conditions.phpt +++ b/ext/mbstring/tests/mb_str_split_error_conditions.phpt @@ -28,6 +28,6 @@ try { ?> --EXPECT-- -mb_str_split(): Argument #2 ($split_length) must be greater than 0 -mb_str_split(): Argument #2 ($split_length) must be greater than 0 +mb_str_split(): Argument #2 ($length) must be greater than 0 +mb_str_split(): Argument #2 ($length) must be greater than 0 mb_str_split(): Argument #3 ($encoding) must be a valid encoding, "BAD_ENCODING" given diff --git a/ext/mbstring/tests/mb_str_unknown_encoding.phpt b/ext/mbstring/tests/mb_str_unknown_encoding.phpt index 5c07c3521cfe1..64f94871e4655 100644 --- a/ext/mbstring/tests/mb_str_unknown_encoding.phpt +++ b/ext/mbstring/tests/mb_str_unknown_encoding.phpt @@ -144,7 +144,7 @@ try { --EXPECT-- mb_chr(): Argument #2 ($encoding) must be a valid encoding, "UTF-0" given mb_convert_case(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given -mb_convert_encoding(): Argument #3 ($from) contains invalid encoding "UTF-0" +mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "UTF-0" mb_convert_kana(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given mb_decode_numericentity(): Argument #3 ($encoding) must be a valid encoding, "UTF-0" given mb_ord(): Argument #2 ($encoding) must be a valid encoding, "UTF-0" given diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 24aa55cbd7e05..d0742b58ea200 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -678,7 +678,7 @@ function str_shuffle(string $str): string {} function str_word_count(string $str, int $format = 0, ?string $charlist = null): array|int {} -function str_split(string $str, int $split_length = 1): array {} +function str_split(string $str, int $length = 1): array {} function strpbrk(string $haystack, string $char_list): string|false {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 6786cdb04a862..83f335ff8d417 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c373aa965002f4c6a816e6574417ce59473ad7b3 */ + * Stub hash: f94146869eeaee6f79a85c6aca36b5b97b7fbd2c */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1074,7 +1074,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_str_split, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, split_length, IS_LONG, 0, "1") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "1") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strpbrk, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) diff --git a/ext/standard/tests/strings/str_split_variation6.phpt b/ext/standard/tests/strings/str_split_variation6.phpt index 4fc049af969d0..a8c1bbf1a927a 100644 --- a/ext/standard/tests/strings/str_split_variation6.phpt +++ b/ext/standard/tests/strings/str_split_variation6.phpt @@ -35,7 +35,7 @@ for($count = 0; $count < count($values); $count++) { --EXPECT-- *** Testing str_split() : different integer values for 'split_length' *** -- Iteration 1 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 2 -- array(42) { [0]=> @@ -124,7 +124,7 @@ array(42) { string(1) "t" } -- Iteration 3 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 4 -- array(1) { [0]=> @@ -143,4 +143,4 @@ array(1) { string(42) "This is a string with 123 & escape char \t" } -- Iteration 7 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 diff --git a/ext/standard/tests/strings/str_split_variation7.phpt b/ext/standard/tests/strings/str_split_variation7.phpt index 0c48596261655..17e802b2406e7 100644 --- a/ext/standard/tests/strings/str_split_variation7.phpt +++ b/ext/standard/tests/strings/str_split_variation7.phpt @@ -37,7 +37,7 @@ for($count = 0; $count < count($values); $count++) { --EXPECT-- *** Testing str_split() : different integer values for 'split_length' with heredoc 'str' *** -- Iteration 1 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 2 -- array(30) { [0]=> @@ -102,7 +102,7 @@ array(30) { string(1) "." } -- Iteration 3 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 -- Iteration 4 -- array(1) { [0]=> @@ -121,4 +121,4 @@ array(1) { string(30) "string with 123,escape char ." } -- Iteration 7 -- -str_split(): Argument #2 ($split_length) must be greater than 0 +str_split(): Argument #2 ($length) must be greater than 0 From 086f58f27a98f79ab11246e6ccbd750890d18644 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 27 Sep 2020 21:58:45 +0200 Subject: [PATCH 2/3] Review updates --- ext/mbstring/mbstring.stub.php | 22 +++++++++---------- ext/mbstring/mbstring_arginfo.h | 18 +++++++-------- ext/mbstring/tests/mb_detect_encoding.phpt | 2 +- ...b_detect_encoding_empty_encoding_list.phpt | 4 ++-- ext/mbstring/tests/mb_ereg_search_setpos.phpt | 8 +++---- .../tests/mb_send_mail_null_bytes.phpt | 2 +- ext/standard/basic_functions.stub.php | 4 ++-- ext/standard/basic_functions_arginfo.h | 6 ++--- 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 0348e13cfb660..14bf595fcfc2d 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -17,9 +17,9 @@ function mb_substitute_character(string|int|null $substitute_character = null): function mb_preferred_mime_name(string $encoding): string|false {} /** @param array $result */ -function mb_parse_str(string $encoded_string, &$result): bool {} +function mb_parse_str(string $string, &$result): bool {} -function mb_output_handler(string $contents, int $status): string {} +function mb_output_handler(string $string, int $status): string {} function mb_str_split(string $string, int $length = 1, ?string $encoding = null): array {} @@ -59,13 +59,13 @@ function mb_strtoupper(string $string, ?string $encoding = null): string {} function mb_strtolower(string $string, ?string $encoding = null): string {} -function mb_detect_encoding(string $string, array|string|null $encoding_list = null, bool $strict = false): string|false {} +function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false {} function mb_list_encodings(): array {} function mb_encoding_aliases(string $encoding): array {} -function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer_encoding = null, string $linefeed = "\r\n", int $indent = 0): string {} +function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer_encoding = null, string $newline = "\r\n", int $indent = 0): string {} function mb_decode_mimeheader(string $string): string {} @@ -73,11 +73,11 @@ function mb_convert_kana(string $string, string $mode = "KV", ?string $encoding function mb_convert_variables(string $to_encoding, array|string $from_encoding, mixed &$var, mixed &...$vars): string|false {} -function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $use_hex = false): string {} +function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $hex = false): string {} function mb_decode_numericentity(string $string, array $map, ?string $encoding = null): string {} -function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_parameters = null): bool {} +function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool {} function mb_get_info(string $type = "all"): array|string|int|false {} @@ -92,11 +92,11 @@ function mb_chr(int $codepoint, ?string $encoding = null): string|false {} #ifdef HAVE_MBREGEX function mb_regex_encoding(?string $encoding = null): string|bool {} -/** @param array $registers */ -function mb_ereg(string $pattern, string $string, &$registers = null): int|false {} +/** @param array $matches */ +function mb_ereg(string $pattern, string $string, &$matches = null): int|false {} -/** @param array $registers */ -function mb_eregi(string $pattern, string $string, &$registers = null): int|false {} +/** @param array $matches */ +function mb_eregi(string $pattern, string $string, &$matches = null): int|false {} function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {} @@ -120,7 +120,7 @@ function mb_ereg_search_getregs(): array|false {} function mb_ereg_search_getpos(): int {} -function mb_ereg_search_setpos(int $position): bool {} +function mb_ereg_search_setpos(int $offset): bool {} function mb_regex_set_options(?string $options = null): string {} #endif diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 636513783cf06..ca91c5cd6fec5 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 78f2c0279d16ea58c551260b84d3504177ae4733 */ + * Stub hash: 3e5b45cf71fe75bde026062816cb28eceea4aa38 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null") @@ -28,12 +28,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_preferred_mime_name, 0, 1, MA ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_parse_str, 0, 2, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_INFO(1, result) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_output_handler, 0, 2, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, contents, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, status, IS_LONG, 0) ZEND_END_ARG_INFO() @@ -120,7 +120,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_detect_encoding, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_TYPE_MASK(0, encoding_list, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") + ZEND_ARG_TYPE_MASK(0, encodings, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() @@ -135,7 +135,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_mimeheader, 0, 1, IS_S ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, transfer_encoding, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, linefeed, IS_STRING, 0, "\"\\r\\n\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, newline, IS_STRING, 0, "\"\\r\\n\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, indent, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -160,7 +160,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_encode_numericentity, 0, 2, I ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, map, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, use_hex, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, hex, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_decode_numericentity, 0, 2, IS_STRING, 0) @@ -174,7 +174,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_send_mail, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_ARRAY|MAY_BE_STRING, "[]") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_parameters, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_params, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE) @@ -208,7 +208,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) - ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, registers, "null") + ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matches, "null") ZEND_END_ARG_INFO() #endif @@ -292,7 +292,7 @@ ZEND_END_ARG_INFO() #if defined(HAVE_MBREGEX) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_setpos, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ZEND_END_ARG_INFO() #endif diff --git a/ext/mbstring/tests/mb_detect_encoding.phpt b/ext/mbstring/tests/mb_detect_encoding.phpt index 2134f3c8b578a..71c44c16427ce 100644 --- a/ext/mbstring/tests/mb_detect_encoding.phpt +++ b/ext/mbstring/tests/mb_detect_encoding.phpt @@ -108,4 +108,4 @@ SJIS: SJIS == INVALID PARAMETER == INT: EUC-JP EUC-JP: EUC-JP -mb_detect_encoding(): Argument #2 ($encoding_list) contains invalid encoding "BAD" +mb_detect_encoding(): Argument #2 ($encodings) contains invalid encoding "BAD" diff --git a/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt b/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt index 28dbc5baa659c..2f9e8b82ade6d 100644 --- a/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt +++ b/ext/mbstring/tests/mb_detect_encoding_empty_encoding_list.phpt @@ -22,5 +22,5 @@ try { ?> --EXPECT-- -mb_detect_encoding(): Argument #2 ($encoding_list) must specify at least one encoding -mb_detect_encoding(): Argument #2 ($encoding_list) must specify at least one encoding +mb_detect_encoding(): Argument #2 ($encodings) must specify at least one encoding +mb_detect_encoding(): Argument #2 ($encodings) must specify at least one encoding diff --git a/ext/mbstring/tests/mb_ereg_search_setpos.phpt b/ext/mbstring/tests/mb_ereg_search_setpos.phpt index 3b73025489fc2..94e55f1febfd7 100644 --- a/ext/mbstring/tests/mb_ereg_search_setpos.phpt +++ b/ext/mbstring/tests/mb_ereg_search_setpos.phpt @@ -36,7 +36,7 @@ foreach($positions as $pos) { ?> --EXPECT-- bool(true) -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range * Position: 5 : bool(true) @@ -47,11 +47,11 @@ bool(true) int(20) * Position: 21 : -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range int(20) * Position: 25 : -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range int(20) * Position: 0 : @@ -67,5 +67,5 @@ bool(true) int(0) * Position: -30 : -mb_ereg_search_setpos(): Argument #1 ($position) is out of range +mb_ereg_search_setpos(): Argument #1 ($offset) is out of range int(0) diff --git a/ext/mbstring/tests/mb_send_mail_null_bytes.phpt b/ext/mbstring/tests/mb_send_mail_null_bytes.phpt index 221daf68ceea8..061451e3b84a4 100644 --- a/ext/mbstring/tests/mb_send_mail_null_bytes.phpt +++ b/ext/mbstring/tests/mb_send_mail_null_bytes.phpt @@ -35,4 +35,4 @@ mb_send_mail(): Argument #1 ($to) must not contain any null bytes mb_send_mail(): Argument #2 ($subject) must not contain any null bytes mb_send_mail(): Argument #3 ($message) must not contain any null bytes mb_send_mail(): Argument #4 ($additional_headers) must not contain any null bytes -mb_send_mail(): Argument #5 ($additional_parameters) must not contain any null bytes +mb_send_mail(): Argument #5 ($additional_params) must not contain any null bytes diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index d0742b58ea200..b640fce9eead6 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -652,7 +652,7 @@ function strip_tags(string $str, array|string|null $allowable_tags = null): stri function setlocale(int $category, $locales, ...$rest): string|false {} /** @param array $result */ -function parse_str(string $encoded_string, &$result): void {} +function parse_str(string $string, &$result): void {} function str_getcsv(string $string, string $delimiter = ",", string $enclosure = "\"", string $escape = '\\'): array {} @@ -1027,7 +1027,7 @@ function link(string $target, string $link): bool {} /* mail.c */ -function mail(string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_parameters = ""): bool {} +function mail(string $to, string $subject, string $message, array|string $additional_headers = [], string $additional_params = ""): bool {} /* math.c */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 83f335ff8d417..e3f8d508e1bc8 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f94146869eeaee6f79a85c6aca36b5b97b7fbd2c */ + * Stub hash: 5e2daf7a5fb04bafdc57b7d3668b94fe573b8b2e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1012,7 +1012,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_setlocale, 0, 2, MAY_BE_STRING|M ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_parse_str, 0, 2, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_INFO(1, result) ZEND_END_ARG_INFO() @@ -1595,7 +1595,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mail, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_ARRAY|MAY_BE_STRING, "[]") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_parameters, IS_STRING, 0, "\"\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_params, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_abs, 0, 1, MAY_BE_LONG|MAY_BE_DOUBLE) From 74f2222c64ab4b884c366259ff6b2224cbf1cd76 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 27 Sep 2020 22:24:47 +0200 Subject: [PATCH 3/3] Fix test --- ext/standard/tests/mail/mail_null_bytes.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/tests/mail/mail_null_bytes.phpt b/ext/standard/tests/mail/mail_null_bytes.phpt index d25757cb59fce..2254b7b8fff3a 100644 --- a/ext/standard/tests/mail/mail_null_bytes.phpt +++ b/ext/standard/tests/mail/mail_null_bytes.phpt @@ -35,4 +35,4 @@ mail(): Argument #1 ($to) must not contain any null bytes mail(): Argument #2 ($subject) must not contain any null bytes mail(): Argument #3 ($message) must not contain any null bytes mail(): Argument #4 ($additional_headers) must not contain any null bytes -mail(): Argument #5 ($additional_parameters) must not contain any null bytes +mail(): Argument #5 ($additional_params) must not contain any null bytes