From: Nikita Popov Date: Tue, 21 Jul 2020 08:39:03 +0000 (+0200) Subject: Fix mb_ereg_search* arg and func info X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33ddc3bb9673facf5531649bad1faf08b2f27009;p=php Fix mb_ereg_search* arg and func info --- diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 789423dbc8..2d88b26ee9 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -105,11 +105,11 @@ function mb_split(string $pattern, string $string, int $limit = -1): array|false function mb_ereg_match(string $pattern, string $string, string $option = UNKNOWN): bool {} -function mb_ereg_search(string $pattern = UNKNOWN, string $option = UNKNOWN): array|bool {} +function mb_ereg_search(string $pattern = UNKNOWN, string $option = UNKNOWN): bool {} -function mb_ereg_search_pos(string $pattern = UNKNOWN, string $option = UNKNOWN): array|bool {} +function mb_ereg_search_pos(string $pattern = UNKNOWN, string $option = UNKNOWN): array|false {} -function mb_ereg_search_regs(string $pattern = UNKNOWN, string $option = UNKNOWN): array|bool {} +function mb_ereg_search_regs(string $pattern = UNKNOWN, string $option = UNKNOWN): array|false {} function mb_ereg_search_init(string $string, string $pattern = UNKNOWN, string $option = UNKNOWN): bool {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index 9eabe3b7ea..74be402d31 100644 --- a/ext/mbstring/mbstring_arginfo.h +++ b/ext/mbstring/mbstring_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 0be93f43fd04fb04e07076006a5c1a94bf6afad0 */ + * Stub hash: fad341194e6c8e180b17f9ba168c062a13db2977 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0) @@ -263,18 +263,21 @@ ZEND_END_ARG_INFO() #endif #if defined(HAVE_MBREGEX) -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search, 0, 0, MAY_BE_ARRAY|MAY_BE_BOOL) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0) ZEND_END_ARG_INFO() #endif #if defined(HAVE_MBREGEX) -#define arginfo_mb_ereg_search_pos arginfo_mb_ereg_search +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search_pos, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0) +ZEND_END_ARG_INFO() #endif #if defined(HAVE_MBREGEX) -#define arginfo_mb_ereg_search_regs arginfo_mb_ereg_search +#define arginfo_mb_ereg_search_regs arginfo_mb_ereg_search_pos #endif #if defined(HAVE_MBREGEX) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 28fb9cbe6a..689c962fc1 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -562,8 +562,8 @@ static const func_info_t func_infos[] = { F1("mb_ereg_replace_callback", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING), F1("mb_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("mb_ereg_search_pos", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG), - F1("mb_ereg_search_regs", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING), - F1("mb_ereg_search_getregs", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING), + F1("mb_ereg_search_regs", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_STRING), + F1("mb_ereg_search_getregs", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_STRING), /* ext/iconv */ F1("iconv", MAY_BE_FALSE | MAY_BE_STRING),