2019-10-06 13:44:15 +00:00
|
|
|
<?php
|
|
|
|
|
2021-02-09 22:21:26 +00:00
|
|
|
/** @generate-class-entries */
|
2020-04-05 19:15:30 +00:00
|
|
|
|
2022-06-23 15:34:08 +00:00
|
|
|
#ifdef HAVE_MBREGEX
|
|
|
|
/**
|
|
|
|
* @var string
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue php_mb_oniguruma_version
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_ONIGURUMA_VERSION = UNKNOWN;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_UPPER
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_UPPER = UNKNOWN;
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_LOWER
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_LOWER = UNKNOWN;
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_TITLE
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_TITLE = UNKNOWN;
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_FOLD
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_FOLD = UNKNOWN;
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_UPPER_SIMPLE
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_UPPER_SIMPLE = UNKNOWN;
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_LOWER_SIMPLE
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_LOWER_SIMPLE = UNKNOWN;
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_TITLE_SIMPLE
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_TITLE_SIMPLE = UNKNOWN;
|
|
|
|
/**
|
|
|
|
* @var int
|
2022-07-19 13:11:42 +00:00
|
|
|
* @cvalue PHP_UNICODE_CASE_FOLD_SIMPLE
|
2022-06-23 15:34:08 +00:00
|
|
|
*/
|
|
|
|
const MB_CASE_FOLD_SIMPLE = UNKNOWN;
|
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_language(?string $language = null): string|bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_internal_encoding(?string $encoding = null): string|bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int, string>|string|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_http_input(?string $type = null): array|string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_http_output(?string $encoding = null): string|bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int, string>|true
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_detect_order(array|string|null $encoding = null): array|bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-05-03 02:44:16 +00:00
|
|
|
function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2019-11-08 22:29:12 +00:00
|
|
|
function mb_preferred_mime_name(string $encoding): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-07-28 21:00:44 +00:00
|
|
|
/** @param array $result */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_parse_str(string $string, &$result): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_output_handler(string $string, int $status): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_str_split(string $string, int $length = 1, ?string $encoding = null): array {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_strlen(string $string, ?string $encoding = null): int {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_strrpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_substr(string $string, int $start, ?int $length = null, ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_strcut(string $string, int $start, ?int $length = null, ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_strwidth(string $string, ?string $encoding = null): int {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = "", ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-30 11:50:34 +00:00
|
|
|
/**
|
|
|
|
* @return array<int|string, mixed>|string|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_convert_case(string $string, int $mode, ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_strtoupper(string $string, ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_strtolower(string $string, ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-10-06 13:44:15 +00:00
|
|
|
function mb_list_encodings(): array {}
|
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-04-08 19:05:59 +00:00
|
|
|
function mb_encoding_aliases(string $encoding): array {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer_encoding = null, string $newline = "\r\n", int $indent = 0): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-04-08 19:05:59 +00:00
|
|
|
function mb_decode_mimeheader(string $string): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_convert_kana(string $string, string $mode = "KV", ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_convert_variables(string $to_encoding, array|string $from_encoding, mixed &$var, mixed &...$vars): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $hex = false): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_decode_numericentity(string $string, array $map, ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int|string, int|string|array>|string|int|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_get_info(string $type = "all"): array|string|int|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_scrub(string $string, ?string $encoding = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-20 00:04:49 +00:00
|
|
|
function mb_ord(string $string, ?string $encoding = null): int|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_chr(int $codepoint, ?string $encoding = null): string|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-05-12 15:59:17 +00:00
|
|
|
#ifdef HAVE_MBREGEX
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_regex_encoding(?string $encoding = null): string|bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
/** @param array $matches */
|
Normalize mb_ereg() return value
mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:
> Returns the byte length of the matched string if a match for
> pattern was found in string, or FALSE if no matches were found
> or an error occurred.
>
> If the optional parameter regs was not passed or the length of
> the matched string is 0, this function returns 1.
Coupling this behavior to the $matches parameter doesn't make sense
-- we know the match length either way, there is no technical
reason to distinguish them. However, returning the match length
is not particularly useful either, especially due to the need to
convert 0-length into 1-length to satisfy "truthy" checks. We
could always return 1, which would kind of match the behavior of
preg_match() -- however, preg_match() actually returns the number
of matches, which is 0 or 1 for preg_match(), while false signals
an error. However, mb_ereg() returns false both for no match and
for an error. This would result in an odd 1|false return value.
The patch canonicalizes mb_ereg() to always return a boolean,
where true indicates a match and false indicates no match or error.
This also matches the behavior of the mb_ereg_match() and
mb_ereg_search() functions.
This fixes the default value integrity violation in PHP 8.
Closes GH-6331.
2020-10-13 14:17:40 +00:00
|
|
|
function mb_ereg(string $pattern, string $string, &$matches = null): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
/** @param array $matches */
|
Normalize mb_ereg() return value
mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:
> Returns the byte length of the matched string if a match for
> pattern was found in string, or FALSE if no matches were found
> or an error occurred.
>
> If the optional parameter regs was not passed or the length of
> the matched string is 0, this function returns 1.
Coupling this behavior to the $matches parameter doesn't make sense
-- we know the match length either way, there is no technical
reason to distinguish them. However, returning the match length
is not particularly useful either, especially due to the need to
convert 0-length into 1-length to satisfy "truthy" checks. We
could always return 1, which would kind of match the behavior of
preg_match() -- however, preg_match() actually returns the number
of matches, which is 0 or 1 for preg_match(), while false signals
an error. However, mb_ereg() returns false both for no match and
for an error. This would result in an odd 1|false return value.
The patch canonicalizes mb_ereg() to always return a boolean,
where true indicates a match and false indicates no match or error.
This also matches the behavior of the mb_ereg_match() and
mb_ereg_search() functions.
This fixes the default value integrity violation in PHP 8.
Closes GH-6331.
2020-10-13 14:17:40 +00:00
|
|
|
function mb_eregi(string $pattern, string $string, &$matches = null): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int, string>|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-11-08 22:29:12 +00:00
|
|
|
function mb_split(string $pattern, string $string, int $limit = -1): array|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_match(string $pattern, string $string, ?string $options = null): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_search(?string $pattern = null, ?string $options = null): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int, int>|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_search_pos(?string $pattern = null, ?string $options = null): array|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int|string, string|false>|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): array|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/**
|
|
|
|
* @return array<int|string, string|false>|false
|
|
|
|
* @refcount 1
|
|
|
|
*/
|
2019-11-08 22:29:12 +00:00
|
|
|
function mb_ereg_search_getregs(): array|false {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
|
|
|
function mb_ereg_search_getpos(): int {}
|
|
|
|
|
2020-09-24 14:14:26 +00:00
|
|
|
function mb_ereg_search_setpos(int $offset): bool {}
|
2019-10-06 13:44:15 +00:00
|
|
|
|
2021-08-26 17:52:11 +00:00
|
|
|
/** @refcount 1 */
|
2020-05-18 18:32:21 +00:00
|
|
|
function mb_regex_set_options(?string $options = null): string {}
|
2019-10-06 13:44:15 +00:00
|
|
|
#endif
|