Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -9483,12 +9483,15 @@ static void zend_compile_const_decl(zend_ast *ast) /* {{{ */
}
}

/* Register before the literal takes the name: interning it there may
* release it, when opcache has put the same string in shared memory
* since the call above. */
zend_register_seen_symbol(name, ZEND_SYMBOL_CONST);

name_node.op_type = IS_CONST;
ZVAL_STR(&name_node.u.constant, name);

zend_emit_op(NULL, ZEND_DECLARE_CONST, &name_node, &value_node);

zend_register_seen_symbol(name, ZEND_SYMBOL_CONST);
}
}
/* }}}*/
Expand Down
Loading