Skip to content

Commit 87df1e0

Browse files
committed
Fix more basic function stubs
User-defined functions can't have multiple parameters with the same name. Don't do that for var_dump/debug_zval_dump. Consistently use array $array to match docs Fix typo in UPGRADING
1 parent f559c78 commit 87df1e0

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

UPGRADING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ PHP 8.0 UPGRADE NOTES
149149
new class {};
150150
// -> class@anonymous
151151

152-
The name shown above is still followed by a null byte and and a unique
152+
The name shown above is still followed by a null byte and a unique
153153
suffix.
154154
. Non-absolute trait method references in trait alias adaptations are now
155155
required to be unambiguous:

ext/standard/basic_functions.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ function array_count_values(array $array): array {}
169169

170170
function array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array {}
171171

172-
function array_reverse(array $input, bool $preserve_keys = false): array {}
172+
function array_reverse(array $array, bool $preserve_keys = false): array {}
173173

174174
function array_pad(array $array, int $pad_size, mixed $pad_value): array {}
175175

176176
function array_flip(array $array): array {}
177177

178-
function array_change_key_case(array $input, int $case = CASE_LOWER): array {}
178+
function array_change_key_case(array $array, int $case = CASE_LOWER): array {}
179179

180180
function array_unique(array $array, int $flags = SORT_STRING): array {}
181181

@@ -1500,11 +1500,11 @@ function convert_uudecode(string $data): string|false {}
15001500

15011501
/* var.c */
15021502

1503-
function var_dump(mixed $value, mixed ...$value): void {}
1503+
function var_dump(mixed $value, mixed ...$values): void {}
15041504

15051505
function var_export(mixed $value, bool $return = false): ?string {}
15061506

1507-
function debug_zval_dump(mixed $value, mixed ...$value): void {}
1507+
function debug_zval_dump(mixed $value, mixed ...$values): void {}
15081508

15091509
function serialize(mixed $value): string {}
15101510

ext/standard/basic_functions_arginfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 269d4da84e4bc6fae246b90e4c50e48463b86f41 */
2+
* Stub hash: 8b6ef365e9635c92ef86adb40b2aba077867f3b2 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@@ -251,7 +251,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_column, 0, 2, IS_ARRAY, 0)
251251
ZEND_END_ARG_INFO()
252252

253253
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_reverse, 0, 1, IS_ARRAY, 0)
254-
ZEND_ARG_TYPE_INFO(0, input, IS_ARRAY, 0)
254+
ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0)
255255
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserve_keys, _IS_BOOL, 0, "false")
256256
ZEND_END_ARG_INFO()
257257

@@ -264,7 +264,7 @@ ZEND_END_ARG_INFO()
264264
#define arginfo_array_flip arginfo_array_values
265265

266266
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_change_key_case, 0, 1, IS_ARRAY, 0)
267-
ZEND_ARG_TYPE_INFO(0, input, IS_ARRAY, 0)
267+
ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0)
268268
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, case, IS_LONG, 0, "CASE_LOWER")
269269
ZEND_END_ARG_INFO()
270270

@@ -2173,7 +2173,7 @@ ZEND_END_ARG_INFO()
21732173

21742174
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_var_dump, 0, 1, IS_VOID, 0)
21752175
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
2176-
ZEND_ARG_VARIADIC_TYPE_INFO(0, value, IS_MIXED, 0)
2176+
ZEND_ARG_VARIADIC_TYPE_INFO(0, values, IS_MIXED, 0)
21772177
ZEND_END_ARG_INFO()
21782178

21792179
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_var_export, 0, 1, IS_STRING, 1)

0 commit comments

Comments
 (0)