]> granicus.if.org Git - php/commitdiff
Fix mb_ereg_search* arg and func info
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 21 Jul 2020 08:39:03 +0000 (10:39 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 21 Jul 2020 08:40:08 +0000 (10:40 +0200)
ext/mbstring/mbstring.stub.php
ext/mbstring/mbstring_arginfo.h
ext/opcache/Optimizer/zend_func_info.c

index 789423dbc87c00b66f5cb1802252a3b83ced05b9..2d88b26ee92b5f9bc0eaa7cf85c7f68036835a8b 100644 (file)
@@ -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 {}
 
index 9eabe3b7ea926297fcb94eb7a4d2db7bf5ef5224..74be402d318123a79900725078d361f790f5a6de 100644 (file)
@@ -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)
index 28fb9cbe6a7bd6147c278716f26a981a6c9f2d8a..689c962fc14c13cd09106183d8de92e4b055a2a0 100644 (file)
@@ -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),