From 1165a9068cbf3c3c24a78b47e0effcf9b90ec5bc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 8 Jan 2019 09:36:48 +0100 Subject: [PATCH] Don't swap operands of ZEND_MUL If this is used with operator overloading, then the operation does not necessarily commute (for example, matrix multiplication). --- ext/opcache/Optimizer/pass3.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3.c index fc2cae10d8..fecadbcec5 100644 --- a/ext/opcache/Optimizer/pass3.c +++ b/ext/opcache/Optimizer/pass3.c @@ -93,7 +93,6 @@ void zend_optimizer_pass3(zend_op_array *op_array) if ((opline->op2_type & (IS_VAR | IS_CV)) && opline->op2.var == next_opline->op1.var && (opline->opcode == ZEND_ADD || - opline->opcode == ZEND_MUL || opline->opcode == ZEND_BW_OR || opline->opcode == ZEND_BW_AND || opline->opcode == ZEND_BW_XOR)) { -- 2.40.0