Skip to content

Commit 7d0102d

Browse files
committed
Revert "Replace @param annotations with type declarations"
This reverts commit c31029f.
1 parent de6984e commit 7d0102d

33 files changed

+249
-146
lines changed

ext/dba/dba.stub.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ function dba_open($path, $mode, $handlername = UNKNOWN, ...$handler_parameters)
1010
function dba_close($handle): void {}
1111

1212
/**
13+
* @param string|array $key
1314
* @param resource $handle
1415
*/
15-
function dba_exists(string|array $key, $handle): bool {}
16+
function dba_exists($key, $handle): bool {}
1617

1718
/**
19+
* @param string|array $key
1820
* @param int|resource $skip actually this parameter is optional, not $handle
1921
* @param resource $handle
2022
*/
21-
function dba_fetch(string|array $key, $skip, $handle = UNKOWN): string|false {}
23+
function dba_fetch($key, $skip, $handle = UNKOWN): string|false {}
2224

2325
function dba_key_split(string $key): array|false {}
2426

@@ -29,19 +31,22 @@ function dba_firstkey($handle): string|false {}
2931
function dba_nextkey($handle): string|false {}
3032

3133
/**
34+
* @param string|array $key
3235
* @param resource $handle
3336
*/
34-
function dba_delete(string|array $key, $handle): bool {}
37+
function dba_delete($key, $handle): bool {}
3538

3639
/**
40+
* @param string|array $key
3741
* @param resource $handle
3842
*/
39-
function dba_insert(string|array $key, string $value, $handle): bool {}
43+
function dba_insert($key, string $value, $handle): bool {}
4044

4145
/**
46+
* @param string|array $key
4247
* @param resource $handle
4348
*/
44-
function dba_replace(string|array $key, string $value, $handle): bool {}
49+
function dba_replace($key, string $value, $handle): bool {}
4550

4651
/** @param resource $handle */
4752
function dba_optimize($handle): bool {}

ext/dba/dba_arginfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_close, 0, 1, IS_VOID, 0)
1414
ZEND_END_ARG_INFO()
1515

1616
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_exists, 0, 2, _IS_BOOL, 0)
17-
ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY)
17+
ZEND_ARG_INFO(0, key)
1818
ZEND_ARG_INFO(0, handle)
1919
ZEND_END_ARG_INFO()
2020

2121
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_dba_fetch, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
22-
ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY)
22+
ZEND_ARG_INFO(0, key)
2323
ZEND_ARG_INFO(0, skip)
2424
ZEND_ARG_INFO(0, handle)
2525
ZEND_END_ARG_INFO()
@@ -37,7 +37,7 @@ ZEND_END_ARG_INFO()
3737
#define arginfo_dba_delete arginfo_dba_exists
3838

3939
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_insert, 0, 3, _IS_BOOL, 0)
40-
ZEND_ARG_TYPE_MASK(0, key, MAY_BE_STRING|MAY_BE_ARRAY)
40+
ZEND_ARG_INFO(0, key)
4141
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
4242
ZEND_ARG_INFO(0, handle)
4343
ZEND_END_ARG_INFO()

ext/gmp/gmp.stub.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

3-
function gmp_init(int|bool|string $number, int $base = 0): GMP|false {}
3+
/** @param int|bool|string $number */
4+
function gmp_init($number, int $base = 0): GMP|false {}
45

56
function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP|false {}
67

ext/gmp/gmp_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* This is a generated file, edit the .stub.php file instead. */
22

33
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_gmp_init, 0, 1, GMP, MAY_BE_FALSE)
4-
ZEND_ARG_TYPE_MASK(0, number, MAY_BE_LONG|MAY_BE_BOOL|MAY_BE_STRING)
4+
ZEND_ARG_INFO(0, number)
55
ZEND_ARG_TYPE_INFO(0, base, IS_LONG, 0)
66
ZEND_END_ARG_INFO()
77

ext/intl/calendar/calendar.stub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ public function isLenient() {}
116116
public function isWeekend(?float $date = null) {}
117117

118118
/**
119+
* @param int|bool $amountOrUpOrDown
119120
* @return bool
120121
*/
121-
public function roll(int $field, int|bool $amountOrUpOrDown) {}
122+
public function roll(int $field, $amountOrUpOrDown) {}
122123

123124
/** @return bool */
124125
public function isSet(int $field) {}
@@ -197,7 +198,8 @@ function intlcal_before(IntlCalendar $calendarObject, IntlCalendar $calendar): b
197198

198199
function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN): bool {}
199200

200-
function intlcal_roll(IntlCalendar $calendar, int $field, int|bool $amountOrUpOrDown): bool {}
201+
/** @param int|bool $amountOrUpOrDown */
202+
function intlcal_roll(IntlCalendar $calendar, int $field, $amountOrUpOrDown): bool {}
201203

202204
function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}
203205

ext/intl/calendar/calendar_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ZEND_END_ARG_INFO()
105105

106106
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlCalendar_roll, 0, 0, 2)
107107
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
108-
ZEND_ARG_TYPE_MASK(0, amountOrUpOrDown, MAY_BE_LONG|MAY_BE_BOOL)
108+
ZEND_ARG_INFO(0, amountOrUpOrDown)
109109
ZEND_END_ARG_INFO()
110110

111111
#define arginfo_class_IntlCalendar_isSet arginfo_class_IntlCalendar_get
@@ -217,7 +217,7 @@ ZEND_END_ARG_INFO()
217217
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_roll, 0, 3, _IS_BOOL, 0)
218218
ZEND_ARG_OBJ_INFO(0, calendar, IntlCalendar, 0)
219219
ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
220-
ZEND_ARG_TYPE_MASK(0, amountOrUpOrDown, MAY_BE_LONG|MAY_BE_BOOL)
220+
ZEND_ARG_INFO(0, amountOrUpOrDown)
221221
ZEND_END_ARG_INFO()
222222

223223
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_intlcal_clear, 0, 1, _IS_BOOL, 0)

ext/intl/formatter/formatter.stub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ public function formatCurrency(float $value, string $currency) {}
2020
public function parseCurrency(string $value, &$currency, &$position = null) {}
2121

2222
/**
23+
* @param int|float $value
2324
* @return bool
2425
*/
25-
public function setAttribute(int $attr, int|float $value) {}
26+
public function setAttribute(int $attr, $value) {}
2627

2728
/** @return int|float|false */
2829
public function getAttribute(int $attr) {}
@@ -65,7 +66,8 @@ function numfmt_format_currency(NumberFormatter $fmt, float $value, string $curr
6566

6667
function numfmt_parse_currency(NumberFormatter $fmt, string $value, &$currency, &$position = null): float|false {}
6768

68-
function numfmt_set_attribute(NumberFormatter $fmt, int $attr, int|float $value): bool {}
69+
/** @param int|float $value */
70+
function numfmt_set_attribute(NumberFormatter $fmt, int $attr, $value): bool {}
6971

7072
function numfmt_get_attribute(NumberFormatter $fmt, int $attr): int|double|false {}
7173

ext/intl/formatter/formatter_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ZEND_END_ARG_INFO()
3232

3333
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_setAttribute, 0, 0, 2)
3434
ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
35-
ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE)
35+
ZEND_ARG_INFO(0, value)
3636
ZEND_END_ARG_INFO()
3737

3838
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter_getAttribute, 0, 0, 1)
@@ -100,7 +100,7 @@ ZEND_END_ARG_INFO()
100100
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_numfmt_set_attribute, 0, 3, _IS_BOOL, 0)
101101
ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
102102
ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
103-
ZEND_ARG_TYPE_MASK(0, value, MAY_BE_LONG|MAY_BE_DOUBLE)
103+
ZEND_ARG_INFO(0, value)
104104
ZEND_END_ARG_INFO()
105105

106106
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_numfmt_get_attribute, 0, 2, double, MAY_BE_LONG|MAY_BE_FALSE)

ext/intl/resourcebundle/resourcebundle.stub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ public function __construct(?string $locale, ?string $bundlename, bool $fallback
88
public static function create(?string $locale, ?string $bundlename, bool $fallback = true) {}
99

1010
/**
11+
* @param string|int $index
1112
* @return mixed
1213
*/
13-
public function get(string|int $index, bool $fallback = true) {}
14+
public function get($index, bool $fallback = true) {}
1415

1516
/** @return int */
1617
public function count() {}
@@ -28,9 +29,10 @@ public function getErrorMessage() {}
2829
function resourcebundle_create(?string $locale, ?string $bundlename, bool $fallback = true): ?ResourceBundle {}
2930

3031
/**
32+
* @param string|int $index
3133
* @return mixed
3234
*/
33-
function resourcebundle_get(ResourceBundle $bundle, string|int $index) {}
35+
function resourcebundle_get(ResourceBundle $bundle, $index) {}
3436

3537
function resourcebundle_count(ResourceBundle $bundle): int {}
3638

ext/intl/resourcebundle/resourcebundle_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ZEND_END_ARG_INFO()
99
#define arginfo_class_ResourceBundle_create arginfo_class_ResourceBundle___construct
1010

1111
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle_get, 0, 0, 1)
12-
ZEND_ARG_TYPE_MASK(0, index, MAY_BE_STRING|MAY_BE_LONG)
12+
ZEND_ARG_INFO(0, index)
1313
ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0)
1414
ZEND_END_ARG_INFO()
1515

@@ -32,7 +32,7 @@ ZEND_END_ARG_INFO()
3232

3333
ZEND_BEGIN_ARG_INFO_EX(arginfo_resourcebundle_get, 0, 0, 2)
3434
ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0)
35-
ZEND_ARG_TYPE_MASK(0, index, MAY_BE_STRING|MAY_BE_LONG)
35+
ZEND_ARG_INFO(0, index)
3636
ZEND_END_ARG_INFO()
3737

3838
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_count, 0, 1, IS_LONG, 0)

ext/ldap/ldap.stub.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,27 @@ function ldap_sasl_bind($link, string $binddn = UNKNOWN, string $password = UNKN
4040

4141
/**
4242
* @param resource|array $link_identifier
43+
* @param string|array $base_dn
44+
* @param string|array $filter
4345
* @return resource|false
4446
*/
45-
function ldap_read($link_identifier, string|array $base_dn, string|array $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
47+
function ldap_read($link_identifier, $base_dn, $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
4648

4749
/**
4850
* @param resource|array $link_identifier
51+
* @param string|array $base_dn
52+
* @param string|array $filter
4953
* @return resource|false
5054
*/
51-
function ldap_list($link_identifier, string|array $base_dn, string|array $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
55+
function ldap_list($link_identifier, $base_dn, $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
5256

5357
/**
5458
* @param resource|array $link_identifier
59+
* @param string|array $base_dn
60+
* @param string|array $filter
5561
* @return resource|false
5662
*/
57-
function ldap_search($link_identifier, string|array $base_dn, string|array $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
63+
function ldap_search($link_identifier, $base_dn, $filter, array $attributes = [], int $attrsonly = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = LDAP_DEREF_NEVER, array $servercontrols = []) {}
5864

5965
/**
6066
* @param resource $link_identifier

ext/ldap/ldap_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ ZEND_END_ARG_INFO()
5151

5252
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_read, 0, 0, 3)
5353
ZEND_ARG_INFO(0, link_identifier)
54-
ZEND_ARG_TYPE_MASK(0, base_dn, MAY_BE_STRING|MAY_BE_ARRAY)
55-
ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_STRING|MAY_BE_ARRAY)
54+
ZEND_ARG_INFO(0, base_dn)
55+
ZEND_ARG_INFO(0, filter)
5656
ZEND_ARG_TYPE_INFO(0, attributes, IS_ARRAY, 0)
5757
ZEND_ARG_TYPE_INFO(0, attrsonly, IS_LONG, 0)
5858
ZEND_ARG_TYPE_INFO(0, sizelimit, IS_LONG, 0)

ext/mbstring/mbstring.stub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ function mb_strwidth(string $str, string $encoding = UNKNOWN): int|false {}
4848

4949
function mb_strimwidth(string $str, int $start, int $width, string $trimmarker = UNKNOWN, string $encoding = UNKNOWN): string|false {}
5050

51-
function mb_convert_encoding(array|string $str, string $to, $from = UNKNOWN): array|string|false {}
51+
/** @param array|string $str */
52+
function mb_convert_encoding($str, string $to, $from = UNKNOWN): array|string|false {}
5253

5354
function mb_convert_case(string $sourcestring, int $mode, ?string $encoding = null): string|false {}
5455

@@ -69,7 +70,8 @@ function mb_decode_mimeheader(string $string): string|false {}
6970

7071
function mb_convert_kana(string $str, string $option = UNKNOWN, string $encoding = UNKNOWN): string|false {}
7172

72-
function mb_convert_variables(string $to, array|string $from, &$var, &...$vars): string|false {}
73+
/** @param array|string $from */
74+
function mb_convert_variables(string $to, $from, &$var, &...$vars): string|false {}
7375

7476
function mb_encode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN, bool $is_hex = false): string|false {}
7577

ext/mbstring/mbstring_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_strimwidth, 0, 3, MAY_BE_STRI
104104
ZEND_END_ARG_INFO()
105105

106106
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_encoding, 0, 2, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
107-
ZEND_ARG_TYPE_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING)
107+
ZEND_ARG_INFO(0, str)
108108
ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
109109
ZEND_ARG_INFO(0, from)
110110
ZEND_END_ARG_INFO()
@@ -155,7 +155,7 @@ ZEND_END_ARG_INFO()
155155

156156
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_convert_variables, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
157157
ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
158-
ZEND_ARG_TYPE_MASK(0, from, MAY_BE_ARRAY|MAY_BE_STRING)
158+
ZEND_ARG_INFO(0, from)
159159
ZEND_ARG_INFO(1, var)
160160
ZEND_ARG_VARIADIC_INFO(1, vars)
161161
ZEND_END_ARG_INFO()

ext/odbc/odbc.stub.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ function odbc_fetch_row($result_id, int $row_number = UNKNOWN): bool {}
5353

5454
/**
5555
* @param resource $result_id
56+
* @param string|int $field
5657
*/
57-
function odbc_result($result_id, string|int $field): string|bool|null {}
58+
function odbc_result($result_id, $field): string|bool|null {}
5859

5960
/** @param resource $result_id */
6061
function odbc_result_all($result_id, string $format = ''): int|false {}

ext/odbc/odbc_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ZEND_END_ARG_INFO()
6969

7070
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result, 0, 2, MAY_BE_STRING|MAY_BE_BOOL|MAY_BE_NULL)
7171
ZEND_ARG_INFO(0, result_id)
72-
ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG)
72+
ZEND_ARG_INFO(0, field)
7373
ZEND_END_ARG_INFO()
7474

7575
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_result_all, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)

ext/openssl/openssl.stub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,15 @@ function openssl_error_string(): string|false {}
123123

124124
/**
125125
* @param resource|string|array $key
126+
* @param int|string $method
126127
*/
127-
function openssl_sign(string $data, &$signature, $key, int|string $method = OPENSSL_ALGO_SHA1): bool {}
128+
function openssl_sign(string $data, &$signature, $key, $method = OPENSSL_ALGO_SHA1): bool {}
128129

129130
/**
130131
* @param resource|string|array $key
132+
* @param int|string $method
131133
*/
132-
function openssl_verify(string $data, string $signature, $key, int|string $method = OPENSSL_ALGO_SHA1): int|false {}
134+
function openssl_verify(string $data, string $signature, $key, $method = OPENSSL_ALGO_SHA1): int|false {}
133135

134136
function openssl_seal(string $data, &$sealdata, &$ekeys, array $pubkeys, string $method = UNKNOWN, &$iv = UNKNOWN): int|false {}
135137

ext/openssl/openssl_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_sign, 0, 3, _IS_BOOL, 0)
210210
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
211211
ZEND_ARG_INFO(1, signature)
212212
ZEND_ARG_INFO(0, key)
213-
ZEND_ARG_TYPE_MASK(0, method, MAY_BE_LONG|MAY_BE_STRING)
213+
ZEND_ARG_INFO(0, method)
214214
ZEND_END_ARG_INFO()
215215

216216
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_verify, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
217217
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
218218
ZEND_ARG_TYPE_INFO(0, signature, IS_STRING, 0)
219219
ZEND_ARG_INFO(0, key)
220-
ZEND_ARG_TYPE_MASK(0, method, MAY_BE_LONG|MAY_BE_STRING)
220+
ZEND_ARG_INFO(0, method)
221221
ZEND_END_ARG_INFO()
222222

223223
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_openssl_seal, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)

ext/pcre/php_pcre.stub.php

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,30 @@ function preg_match(string $pattern, string $subject, &$subpatterns = null, int
44

55
function preg_match_all(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0): int|false|null {}
66

7-
function preg_replace(string|array $regex, string|array $replace, string|array $subject, int $limit = -1, &$count = null): string|array|null {}
7+
/**
8+
* @param string|array $regex
9+
* @param string|array $replace
10+
* @param string|array $subject
11+
*/
12+
function preg_replace($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {}
813

9-
function preg_filter(string|array $regex, string|array $replace, string|array $subject, int $limit = -1, &$count = null): string|array|null {}
14+
/**
15+
* @param string|array $regex
16+
* @param string|array $replace
17+
* @param string|array $subject
18+
*/
19+
function preg_filter($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {}
1020

1121
/**
22+
* @param string|array $regex
23+
* @param string|array $subject
24+
*
1225
* TODO: $callback should be `callable`
1326
*/
14-
function preg_replace_callback(string|array $regex, $callback, string|array $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
27+
function preg_replace_callback($regex, $callback, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
1528

16-
function preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
29+
/** @param string|array $subject */
30+
function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
1731

1832
function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array|false {}
1933

0 commit comments

Comments
 (0)