Commit eafc26784d9 for php.net
commit eafc26784d92b63e86eb92d8d9c618d8538ac4b2
Author: Tim Düsterhus <tim@tideways-gmbh.com>
Date: Thu Apr 23 19:21:27 2026 +0200
zend_compile: Fix incorrect use of `ZVAL_NEW_STR()` in `zend_compile_call()` (#21851)
`zend_string_tolower()` might return the original string when it's already
fully lowercase.
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 5e93c2f864e..9552d9e440f 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -5203,7 +5203,7 @@ static void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{
}
zval_ptr_dtor(&name_node.u.constant);
- ZVAL_NEW_STR(&name_node.u.constant, lcname);
+ ZVAL_STR(&name_node.u.constant, lcname);
opline = zend_emit_op(NULL, ZEND_INIT_FCALL, NULL, &name_node);
opline->result.num = zend_alloc_cache_slot();