summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 32c5e2e221..bbe69d0a43 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -6079,7 +6079,8 @@ void zend_compile_class_const_decl(zend_ast *ast) /* {{{ */
}
zend_const_expr_to_zval(&value_zv, value_ast);
- if (Z_TYPE(value_zv) == IS_STRING) {
+ if (Z_TYPE(value_zv) == IS_STRING && !ZSTR_IS_INTERNED(Z_STR(value_zv))) {
+ SEPARATE_STRING(&value_zv);
zval_make_interned_string(&value_zv);
}
zend_declare_class_constant_ex(ce, name, &value_zv, ast->attr, doc_comment);