diff options
Diffstat (limited to 'ext/standard')
-rwxr-xr-x | ext/standard/basic_functions.stub.php | 44 | ||||
-rwxr-xr-x | ext/standard/basic_functions_arginfo.h | 16 |
2 files changed, 20 insertions, 40 deletions
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index b35b84fffa..ba7e17d7bc 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -80,38 +80,22 @@ function uasort(array &$arg, callable $cmp_function): bool {} function uksort(array &$arg, callable $cmp_function): bool {} -/** - * @param array|object $arg - * @return mixed - */ -function end(array &$arg) {} +/** @return mixed */ +function end(array|object &$arg) {} -/** - * @param array|object $arg - * @return mixed - */ -function prev(&$arg) {} +/** @return mixed */ +function prev(array|object &$arg) {} -/** - * @param array|object $arg - * @return mixed - */ -function next(&$arg) {} +/** @return mixed */ +function next(array|object &$arg) {} -/** - * @param array|object $arg - * @return mixed - */ -function reset(&$arg) {} +/** @return mixed */ +function reset(array|object &$arg) {} -/** - * @param array|object $arg - * @return mixed - */ -function current($arg) {} +/** @return mixed */ +function current(array|object $arg) {} -/** @param array|object $arg */ -function key($arg): int|string|null {} +function key(array|object $arg): int|string|null {} /** @return mixed */ function min($arg, ...$args) {} @@ -119,11 +103,9 @@ function min($arg, ...$args) {} /** @return mixed */ function max($arg, ...$args) {} -/** @param array|object $input */ -function array_walk(&$input, callable $funcname, $userdata = null): bool {} +function array_walk(array|object &$input, callable $funcname, $userdata = null): bool {} -/** @param array|object $input */ -function array_walk_recursive(&$input, callable $funcname, $userdata = null): bool {} +function array_walk_recursive(array|object &$input, callable $funcname, $userdata = null): bool {} function in_array($needle, array $haystack, bool $strict = false): bool {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index f62df22dae..82d15731cb 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -107,23 +107,21 @@ ZEND_END_ARG_INFO() #define arginfo_uksort arginfo_usort ZEND_BEGIN_ARG_INFO_EX(arginfo_end, 0, 0, 1) - ZEND_ARG_TYPE_INFO(1, arg, IS_ARRAY, 0) + ZEND_ARG_TYPE_MASK(1, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_prev, 0, 0, 1) - ZEND_ARG_INFO(1, arg) -ZEND_END_ARG_INFO() +#define arginfo_prev arginfo_end -#define arginfo_next arginfo_prev +#define arginfo_next arginfo_end -#define arginfo_reset arginfo_prev +#define arginfo_reset arginfo_end ZEND_BEGIN_ARG_INFO_EX(arginfo_current, 0, 0, 1) - ZEND_ARG_INFO(0, arg) + ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_key, 0, 1, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_NULL) - ZEND_ARG_INFO(0, arg) + ZEND_ARG_TYPE_MASK(0, arg, MAY_BE_ARRAY|MAY_BE_OBJECT) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_min, 0, 0, 1) @@ -134,7 +132,7 @@ ZEND_END_ARG_INFO() #define arginfo_max arginfo_min ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_array_walk, 0, 2, _IS_BOOL, 0) - ZEND_ARG_INFO(1, input) + ZEND_ARG_TYPE_MASK(1, input, MAY_BE_ARRAY|MAY_BE_OBJECT) ZEND_ARG_TYPE_INFO(0, funcname, IS_CALLABLE, 0) ZEND_ARG_INFO(0, userdata) ZEND_END_ARG_INFO() |