xref: /php-src/ext/mbstring/mbstring.stub.php (revision f8137084)
1<?php
2
3/** @generate-class-entries */
4
5#ifdef HAVE_MBREGEX
6/**
7 * @var string
8 * @cvalue php_mb_oniguruma_version
9 */
10const MB_ONIGURUMA_VERSION = UNKNOWN;
11#endif
12
13/**
14 * @var int
15 * @cvalue PHP_UNICODE_CASE_UPPER
16 */
17const MB_CASE_UPPER = UNKNOWN;
18/**
19 * @var int
20 * @cvalue PHP_UNICODE_CASE_LOWER
21 */
22const MB_CASE_LOWER = UNKNOWN;
23/**
24 * @var int
25 * @cvalue PHP_UNICODE_CASE_TITLE
26 */
27const MB_CASE_TITLE = UNKNOWN;
28/**
29 * @var int
30 * @cvalue PHP_UNICODE_CASE_FOLD
31 */
32const MB_CASE_FOLD = UNKNOWN;
33/**
34 * @var int
35 * @cvalue PHP_UNICODE_CASE_UPPER_SIMPLE
36 */
37const MB_CASE_UPPER_SIMPLE = UNKNOWN;
38/**
39 * @var int
40 * @cvalue PHP_UNICODE_CASE_LOWER_SIMPLE
41 */
42const MB_CASE_LOWER_SIMPLE = UNKNOWN;
43/**
44 * @var int
45 * @cvalue PHP_UNICODE_CASE_TITLE_SIMPLE
46 */
47const MB_CASE_TITLE_SIMPLE = UNKNOWN;
48/**
49 * @var int
50 * @cvalue PHP_UNICODE_CASE_FOLD_SIMPLE
51 */
52const MB_CASE_FOLD_SIMPLE = UNKNOWN;
53
54/** @refcount 1 */
55function mb_language(?string $language = null): string|bool {}
56
57/** @refcount 1 */
58function mb_internal_encoding(?string $encoding = null): string|bool {}
59
60/**
61 * @return array<int, string>|string|false
62 * @refcount 1
63 */
64function mb_http_input(?string $type = null): array|string|false {}
65
66/** @refcount 1 */
67function mb_http_output(?string $encoding = null): string|bool {}
68
69/**
70 * @return array<int, string>|true
71 * @refcount 1
72 */
73function mb_detect_order(array|string|null $encoding = null): array|bool {}
74
75/** @refcount 1 */
76function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool {}
77
78/** @refcount 1 */
79function mb_preferred_mime_name(string $encoding): string|false {}
80
81/** @param array $result */
82function mb_parse_str(string $string, &$result): bool {}
83
84/** @refcount 1 */
85function mb_output_handler(string $string, int $status): string {}
86
87function mb_str_split(string $string, int $length = 1, ?string $encoding = null): array {}
88
89function mb_strlen(string $string, ?string $encoding = null): int {}
90
91function mb_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
92
93function mb_strrpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
94
95function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
96
97function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
98
99/** @refcount 1 */
100function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
101
102/** @refcount 1 */
103function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
104
105/** @refcount 1 */
106function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
107
108/** @refcount 1 */
109function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false {}
110
111function mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int {}
112
113/** @refcount 1 */
114function mb_substr(string $string, int $start, ?int $length = null, ?string $encoding = null): string {}
115
116/** @refcount 1 */
117function mb_strcut(string $string, int $start, ?int $length = null, ?string $encoding = null): string {}
118
119function mb_strwidth(string $string, ?string $encoding = null): int {}
120
121function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = "", ?string $encoding = null): string {}
122
123/**
124 * @return array<int|string, mixed>|string|false
125 * @refcount 1
126 */
127function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false {}
128
129/** @refcount 1 */
130function mb_convert_case(string $string, int $mode, ?string $encoding = null): string {}
131
132/** @refcount 1 */
133function mb_strtoupper(string $string, ?string $encoding = null): string {}
134
135/** @refcount 1 */
136function mb_strtolower(string $string, ?string $encoding = null): string {}
137
138function mb_ucfirst(string $string, ?string $encoding = null): string {}
139
140function mb_lcfirst(string $string, ?string $encoding = null): string {}
141
142function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string {}
143
144function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string {}
145
146function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string {}
147
148/** @refcount 1 */
149function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false {}
150
151/**
152 * @return array<int, string>
153 */
154function mb_list_encodings(): array {}
155
156/**
157 * @return array<int, string>
158 * @refcount 1
159 */
160function mb_encoding_aliases(string $encoding): array {}
161
162/** @refcount 1 */
163function mb_encode_mimeheader(string $string, ?string $charset = null, ?string $transfer_encoding = null, string $newline = "\r\n", int $indent = 0): string {}
164
165/** @refcount 1 */
166function mb_decode_mimeheader(string $string): string {}
167
168/** @refcount 1 */
169function mb_convert_kana(string $string, string $mode = "KV", ?string $encoding = null): string {}
170
171/** @refcount 1 */
172function mb_convert_variables(string $to_encoding, array|string $from_encoding, mixed &$var, mixed &...$vars): string|false {}
173
174/** @refcount 1 */
175function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $hex = false): string {}
176
177/** @refcount 1 */
178function mb_decode_numericentity(string $string, array $map, ?string $encoding = null): string {}
179
180function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool {}
181
182/**
183 * @return array<int|string, int|string|array>|string|int|false|null
184 * @refcount 1
185 */
186function mb_get_info(string $type = "all"): array|string|int|false|null {}
187
188function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool {}
189
190function mb_scrub(string $string, ?string $encoding = null): string {}
191
192function mb_ord(string $string, ?string $encoding = null): int|false {}
193
194function mb_chr(int $codepoint, ?string $encoding = null): string|false {}
195
196function mb_str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string {}
197
198#ifdef HAVE_MBREGEX
199/** @refcount 1 */
200function mb_regex_encoding(?string $encoding = null): string|bool {}
201
202/** @param array $matches */
203function mb_ereg(string $pattern, string $string, &$matches = null): bool {}
204
205/** @param array $matches */
206function mb_eregi(string $pattern, string $string, &$matches = null): bool {}
207
208/** @refcount 1 */
209function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}
210
211/** @refcount 1 */
212function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}
213
214/** @refcount 1 */
215function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {}
216
217/**
218 * @return array<int, string>|false
219 * @refcount 1
220 */
221function mb_split(string $pattern, string $string, int $limit = -1): array|false {}
222
223function mb_ereg_match(string $pattern, string $string, ?string $options = null): bool {}
224
225function mb_ereg_search(?string $pattern = null, ?string $options = null): bool {}
226
227/**
228 * @return array<int, int>|false
229 * @refcount 1
230 */
231function mb_ereg_search_pos(?string $pattern = null, ?string $options = null): array|false {}
232
233/**
234 * @return array<int|string, string|false>|false
235 * @refcount 1
236 */
237function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): array|false {}
238
239function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null): bool {}
240
241/**
242 * @return array<int|string, string|false>|false
243 * @refcount 1
244 */
245function mb_ereg_search_getregs(): array|false {}
246
247function mb_ereg_search_getpos(): int {}
248
249function mb_ereg_search_setpos(int $offset): bool {}
250
251/** @refcount 1 */
252function mb_regex_set_options(?string $options = null): string {}
253#endif
254