From: Nikita Popov Date: Mon, 25 Jun 2018 12:27:02 +0000 (+0200) Subject: Update array_element_type inference for previous change X-Git-Tag: php-7.3.0alpha3~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=102bcb5c05d91b5138c72df5b118b25c6f9ad383;p=php Update array_element_type inference for previous change LIST_R and DIM_IS return value can't be MAY_BE_REF anymore. --- diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index b49fa61e31..650a458df7 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2059,7 +2059,7 @@ uint32_t zend_array_element_type(zend_op *opline, uint32_t t1) tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; } if (t1 & MAY_BE_ARRAY_OF_REF) { - if (opline->opcode == ZEND_FETCH_DIM_R) { + if (!write) { /* can't be REF because of ZVAL_COPY_DEREF() usage */ tmp |= MAY_BE_RC1 | MAY_BE_RCN; } else {