Skip to content

Commit 545d56f

Browse files
committed
Fix cufa array_slice optimization
1 parent 6babcab commit 545d56f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Zend/zend_compile.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4387,7 +4387,11 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze
43874387
zend_compile_expr(&len_node, list->child[2]);
43884388
opline = zend_emit_op(NULL, ZEND_SEND_ARRAY, &arg_node, &len_node);
43894389
opline->extended_value = Z_LVAL_P(zv);
4390-
zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL);
4390+
opline = zend_emit_op(result, ZEND_DO_FCALL, NULL, NULL);
4391+
if (type == BP_VAR_R || type == BP_VAR_IS) {
4392+
opline->result_type = IS_TMP_VAR;
4393+
result->op_type = IS_TMP_VAR;
4394+
}
43914395
zend_string_release_ex(name, 0);
43924396
return SUCCESS;
43934397
}

0 commit comments

Comments
 (0)