summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-06-02 10:15:50 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-06-02 10:16:13 +0200
commit6b45039fb768a038783dff496ce14780c478482a (patch)
tree3195bd5445ada06ae407933fc8f3de588371e366
parent27066154185210e8532636612e5121423d70870f (diff)
downloadphp-git-6b45039fb768a038783dff496ce14780c478482a.tar.gz
Add some mixed types
-rwxr-xr-xext/standard/basic_functions.stub.php8
-rwxr-xr-xext/standard/basic_functions_arginfo.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
index 85f12984aa..963c5b02f4 100755
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -106,17 +106,17 @@ function pos(array|object $arg): mixed {}
function key(array|object $arg): int|string|null {}
-function min($arg, mixed ...$args): mixed {}
+function min(mixed $arg, mixed ...$args): mixed {}
-function max($arg, mixed ...$args): mixed {}
+function max(mixed $arg, mixed ...$args): mixed {}
function array_walk(array|object &$input, callable $funcname, $userdata = UNKNOWN): bool {}
function array_walk_recursive(array|object &$input, callable $funcname, $userdata = UNKNOWN): bool {}
-function in_array($needle, array $haystack, bool $strict = false): bool {}
+function in_array(mixed $needle, array $haystack, bool $strict = false): bool {}
-function array_search($needle, array $haystack, bool $strict = false): int|string|false {}
+function array_search(mixed $needle, array $haystack, bool $strict = false): int|string|false {}
/** @prefer-ref $arg */
function extract(array &$arg, int $extract_type = EXTR_OVERWRITE, string $prefix = ""): int {}
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
index 20b1ed6835..e7d77c1e81 100755
--- a/ext/standard/basic_functions_arginfo.h
+++ b/ext/standard/basic_functions_arginfo.h
@@ -131,7 +131,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_key, 0, 1, MAY_BE_LONG|MAY_BE_ST
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_min, 0, 1, IS_MIXED, 0)
- ZEND_ARG_INFO(0, arg)
+ ZEND_ARG_TYPE_INFO(0, arg, IS_MIXED, 0)
ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0)
ZEND_END_ARG_INFO()
@@ -146,13 +146,13 @@ ZEND_END_ARG_INFO()
#define arginfo_array_walk_recursive arginfo_array_walk
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_in_array, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_INFO(0, needle)
+ ZEND_ARG_TYPE_INFO(0, needle, IS_MIXED, 0)
ZEND_ARG_TYPE_INFO(0, haystack, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_array_search, 0, 2, MAY_BE_LONG|MAY_BE_STRING|MAY_BE_FALSE)
- ZEND_ARG_INFO(0, needle)
+ ZEND_ARG_TYPE_INFO(0, needle, IS_MIXED, 0)
ZEND_ARG_TYPE_INFO(0, haystack, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, strict, _IS_BOOL, 0, "false")
ZEND_END_ARG_INFO()