diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-22 09:59:25 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-22 09:59:35 +0200 |
| commit | ade57e691bcdf76494a824a712688b25d049a506 (patch) | |
| tree | 3a138e97cc17ebf1c741fd105aa55f201be941ed | |
| parent | 8f3a38d927d0ada4ae84aed03aff6fc8df38ea61 (diff) | |
| download | php-git-ade57e691bcdf76494a824a712688b25d049a506.tar.gz | |
substr_replace() cannot return false
| -rw-r--r-- | ext/opcache/Optimizer/zend_func_info.c | 2 | ||||
| -rwxr-xr-x | ext/standard/basic_functions.stub.php | 2 | ||||
| -rw-r--r-- | ext/standard/basic_functions_arginfo.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 42dd8c6914..87ec2e1ffa 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -160,7 +160,7 @@ static const func_info_t func_infos[] = { F1("str_word_count", MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("str_split", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING), - FN("substr_replace", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING), + FN("substr_replace", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING), F1("quotemeta", MAY_BE_STRING), F1("ucwords", MAY_BE_STRING), F1("addcslashes", MAY_BE_STRING), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 33357352e8..1ef91e4623 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -609,7 +609,7 @@ function chunk_split(string $str, int $chunklen = 76, string $ending = "\r\n"): function substr(string $str, int $start, ?int $length = null): string|false {} -function substr_replace(array|string $str, array|string $replace, array|int $start, array|int|null $length = null): string|array|false {} +function substr_replace(array|string $str, array|string $replace, array|int $start, array|int|null $length = null): string|array {} function quotemeta(string $str): string {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 5919da6b8e..b51a11bafa 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3dc6fc3e3cd4bb5442bfd50c34463b3834bba289 */ + * Stub hash: e71146872a1913d2cef37132c8b27ce1dc9b1a39 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -930,7 +930,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr, 0, 2, MAY_BE_STRING|MAY_ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_substr_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY) ZEND_ARG_TYPE_MASK(0, str, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_MASK(0, start, MAY_BE_ARRAY|MAY_BE_LONG, NULL) |
