str_replace() can return the original string

This commit is contained in:
Nikita Popov 2021-08-30 10:22:45 +02:00
parent f6d30cfba7
commit 0f7e0cf34b
3 changed files with 3 additions and 5 deletions

View File

@ -177,8 +177,8 @@ static const func_info_t func_infos[] = {
F1("strrev", MAY_BE_STRING),
F1("stripcslashes", MAY_BE_STRING),
F1("stripslashes", MAY_BE_STRING),
F1("str_replace", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING),
F1("str_ireplace", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING),
FN("str_replace", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING),
FN("str_ireplace", MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING),
F1("hebrev", MAY_BE_STRING),
F1("strip_tags", MAY_BE_STRING),
F1("str_getcsv", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL),

View File

@ -745,14 +745,12 @@ function stripslashes(string $string): string {}
/**
* @param int $count
* @return string|array<int|string, string>
* @refcount 1
*/
function str_replace(array|string $search, array|string $replace, string|array $subject, &$count = null): string|array {}
/**
* @param int $count
* @return string|array<int|string, string>
* @refcount 1
*/
function str_ireplace(array|string $search, array|string $replace, string|array $subject, &$count = null): string|array {}

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 386940942fc177fac3055db915946c57a758ff3f */
* Stub hash: 76feb2922e5b577a6cf137d66973a255b6bd341c */
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)