Commit 933ae15c0a9 for php.net
commit 933ae15c0a9e1968aaa258f5c4f2832008ec17bb
Author: Gina Peter Banyard <girgias@php.net>
Date: Thu Apr 2 17:14:44 2026 +0100
Zend/zend_execute.c: mark some error functions as static
Those are never used outside of zend_execute.c so no reason to export them in a header
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index fb9c1587e7b..c575fc4c738 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -835,7 +835,7 @@ ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool s
return zend_verify_weak_scalar_type_hint(type_mask, arg);
}
-zend_never_inline ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant)
+static zend_never_inline ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant)
{
zend_string *type_str = zend_type_to_string(c->type);
@@ -845,7 +845,7 @@ zend_never_inline ZEND_COLD void zend_verify_class_constant_type_error(const zen
zend_string_release(type_str);
}
-zend_never_inline ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property)
+static zend_never_inline ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property)
{
zend_string *type_str;
@@ -863,7 +863,7 @@ zend_never_inline ZEND_COLD void zend_verify_property_type_error(const zend_prop
zend_string_release(type_str);
}
-zend_never_inline ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
+static zend_never_inline ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
{
/* we _may_ land here in case reading already errored and runtime cache thus has not been updated (i.e. it contains a valid but unrelated info) */
if (EG(exception)) {
@@ -3921,7 +3921,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info
zend_string_release(type_str);
}
-ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
+static ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
zend_string *type1_str = zend_type_to_string(prop1->type);
zend_string *type2_str = zend_type_to_string(prop2->type);
zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s and property %s::$%s of type %s, as this would result in an inconsistent type conversion",
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 92ce8a0dcbb..c724ac78e1f 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -585,11 +585,8 @@ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *cal
ZEND_API bool zend_verify_class_constant_type(const zend_class_constant *c, const zend_string *name, zval *constant);
-ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant);
ZEND_API bool zend_verify_property_type(const zend_property_info *info, zval *property, bool strict);
-ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property);
-ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property);
#define ZEND_REF_ADD_TYPE_SOURCE(ref, source) \
zend_ref_add_type_source(&ZEND_REF_TYPE_SOURCES(ref), source)