diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/opcache/Optimizer/optimize_func_calls.c | 2 | ||||
-rw-r--r-- | ext/opcache/Optimizer/zend_optimizer.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c index aa62a4542d..9031a38f56 100644 --- a/ext/opcache/Optimizer/optimize_func_calls.c +++ b/ext/opcache/Optimizer/optimize_func_calls.c @@ -143,8 +143,6 @@ void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx TSRMLS if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) && call_stack[call - 1].func) { if (ARG_SHOULD_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) { opline->extended_value |= ZEND_ARG_COMPILE_TIME_BOUND | ZEND_ARG_SEND_BY_REF; - } else if (opline->extended_value) { - opline->extended_value |= ZEND_ARG_COMPILE_TIME_BOUND; } else { opline->opcode = ZEND_SEND_VAR; opline->extended_value = 0; diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index 1a6d0b675a..589028368f 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -283,6 +283,14 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array, case ZEND_ASSIGN_DIM: case ZEND_SEPARATE: return 0; + case ZEND_SEND_VAR: + opline->extended_value = 0; + opline->opcode = ZEND_SEND_VAL; + break; + case ZEND_SEND_VAR_EX: + opline->extended_value = 0; + opline->opcode = ZEND_SEND_VAL_EX; + break; case ZEND_SEND_VAR_NO_REF: if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { if (opline->extended_value & ZEND_ARG_SEND_BY_REF) { |