summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer/pass1_5.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/Optimizer/pass1_5.c')
-rw-r--r--ext/opcache/Optimizer/pass1_5.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index 7e0d14ac60..24c28e976e 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -42,9 +42,8 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
int i = 0;
zend_op *opline = op_array->opcodes;
zend_op *end = opline + op_array->last;
- /* bug #71127*
- zend_bool collect_constants = (op_array == &ctx->script->main_op_array); */
- zend_bool collect_constants = 0;
+ zend_bool collect_constants = (ZEND_OPTIMIZER_PASS_15 & OPTIMIZATION_LEVEL)?
+ (op_array == &ctx->script->main_op_array) : 0;
while (opline < end) {
switch (opline->opcode) {