From: Nikita Popov Date: Fri, 30 Aug 2019 09:18:47 +0000 (+0200) Subject: Fix func info for chop() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69cf5352617909b5c82c862bcfef775f058987c5;p=php Fix func info for chop() chop() is an alias of rtrim() and may return copied strings, so should use FN. --- diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index da1564cdd8..41b44ee68f 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -220,6 +220,7 @@ static const func_info_t func_infos[] = { FN("addslashes", MAY_BE_STRING), F1("addcslashes", MAY_BE_STRING), FN("rtrim", MAY_BE_STRING), + FN("chop", MAY_BE_STRING), FN("str_replace", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT), FN("str_ireplace", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT), F1("str_repeat", MAY_BE_NULL | MAY_BE_STRING), @@ -244,7 +245,6 @@ static const func_info_t func_infos[] = { F0("parse_str", MAY_BE_NULL), F1("str_getcsv", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING), F1("str_pad", MAY_BE_NULL | MAY_BE_STRING), - F1("chop", MAY_BE_STRING), F1("strchr", MAY_BE_FALSE | MAY_BE_STRING), F1("sprintf", MAY_BE_FALSE | MAY_BE_STRING), F0("printf", MAY_BE_FALSE | MAY_BE_LONG),