Skip to content

Commit 1dcb559

Browse files
committed
Mark array_walk $userdata arg as UNKNOWN
It makes a difference whether this arg is not passed or is null.
1 parent b3f3a80 commit 1dcb559

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ function min($arg, ...$args) {}
120120
/** @return mixed */
121121
function max($arg, ...$args) {}
122122

123-
function array_walk(array|object &$input, callable $funcname, $userdata = null): bool {}
123+
function array_walk(array|object &$input, callable $funcname, $userdata = UNKNOWN): bool {}
124124

125-
function array_walk_recursive(array|object &$input, callable $funcname, $userdata = null): bool {}
125+
function array_walk_recursive(array|object &$input, callable $funcname, $userdata = UNKNOWN): bool {}
126126

127127
function in_array($needle, array $haystack, bool $strict = false): bool {}
128128

ext/standard/basic_functions_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ ZEND_END_ARG_INFO()
140140
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_walk, 0, 2, _IS_BOOL, 0)
141141
ZEND_ARG_TYPE_MASK(1, input, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
142142
ZEND_ARG_TYPE_INFO(0, funcname, IS_CALLABLE, 0)
143-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, userdata, "null")
143+
ZEND_ARG_INFO(0, userdata)
144144
ZEND_END_ARG_INFO()
145145

146146
#define arginfo_array_walk_recursive arginfo_array_walk

0 commit comments

Comments
 (0)