]> granicus.if.org Git - php/commitdiff
Fix func info for chop()
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 30 Aug 2019 09:18:47 +0000 (11:18 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 30 Aug 2019 09:18:47 +0000 (11:18 +0200)
chop() is an alias of rtrim() and may return copied strings, so
should use FN.

ext/opcache/Optimizer/zend_func_info.c

index da1564cdd85356596acbf3d4ebd38f22d1ffe343..41b44ee68ff87333f2dcf05f2c01888fcf69a891 100644 (file)
@@ -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),