Skip to content

Commit

Permalink
Fix mb_ereg_search* arg and func info
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jul 21, 2020
1 parent da4262d commit 33ddc3b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions ext/mbstring/mbstring.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

Expand Down
11 changes: 7 additions & 4 deletions ext/mbstring/mbstring_arginfo.h
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ext/opcache/Optimizer/zend_func_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 33ddc3b

Please sign in to comment.