From: Nikita Popov Date: Sat, 17 Feb 2018 17:42:08 +0000 (+0100) Subject: Add RC flags in init_func_return_info X-Git-Tag: php-7.2.4RC1~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a50a50bcfc570e506aca0fe24b8ffe12ad3fb1e;p=php Add RC flags in init_func_return_info --- diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 9e58b9fd73..10db7a0042 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -3699,6 +3699,8 @@ void zend_init_func_return_info(const zend_op_array *op_array, ret->type = zend_fetch_arg_info(script, ret_info, &ret->ce); if (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) { ret->type |= MAY_BE_REF; + } else if (ret->type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) { + ret->type |= MAY_BE_RC1|MAY_BE_RCN; } ret->is_instanceof = (ret->ce) ? 1 : 0; ret->range = tmp_range;