diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-05 11:40:45 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-05 11:40:45 +0200 |
commit | 920283ff2b02de4a8affc48c75e5481c381ca56e (patch) | |
tree | ccab590be85c7a4c81e628983af15a451f70453f /ext/opcache/Optimizer/zend_inference.c | |
parent | 3ec87769408cf21d7b1d399cc6b62c1e9b9bf451 (diff) | |
parent | c353f17d4251f185d8fdb756991782671b0e2ac6 (diff) | |
download | php-git-920283ff2b02de4a8affc48c75e5481c381ca56e.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
Diffstat (limited to 'ext/opcache/Optimizer/zend_inference.c')
-rw-r--r-- | ext/opcache/Optimizer/zend_inference.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index b352ab0889..e37ab32681 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -3227,6 +3227,9 @@ static int zend_update_type_info(const zend_op_array *op_array, case ZEND_FETCH_DIM_RW: case ZEND_FETCH_DIM_FUNC_ARG: case ZEND_FETCH_LIST_W: + case ZEND_ASSIGN_DIM: + tmp |= MAY_BE_ARRAY | MAY_BE_ARRAY_OF_ARRAY; + break; case ZEND_ASSIGN_ADD: case ZEND_ASSIGN_SUB: case ZEND_ASSIGN_MUL: @@ -3239,8 +3242,11 @@ static int zend_update_type_info(const zend_op_array *op_array, case ZEND_ASSIGN_BW_AND: case ZEND_ASSIGN_BW_XOR: case ZEND_ASSIGN_POW: - case ZEND_ASSIGN_DIM: - tmp |= MAY_BE_ARRAY | MAY_BE_ARRAY_OF_ARRAY; + if (op_array->opcodes[j].extended_value == ZEND_ASSIGN_DIM) { + tmp |= MAY_BE_ARRAY | MAY_BE_ARRAY_OF_ARRAY; + } else if (op_array->opcodes[j].extended_value == ZEND_ASSIGN_OBJ) { + tmp |= MAY_BE_ARRAY_OF_OBJECT; + } break; case ZEND_FETCH_OBJ_W: case ZEND_FETCH_OBJ_RW: |