Commit 22f80dcf993 for php.net
commit 22f80dcf9932035bacbde7fc61712373ff72bdb0
Author: Daniel Scherzer <daniel.e.scherzer@gmail.com>
Date: Thu Jul 2 10:47:41 2026 -0700
Implement `ReflectionClassConstant::isDeprecated()` using existing helper
Use the `_class_constant_check_flag()` helper function to simplify things
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 8e3113f7a6e..f25cd09e067 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4050,14 +4050,7 @@ ZEND_METHOD(ReflectionClassConstant, isEnumCase)
ZEND_METHOD(ReflectionClassConstant, isDeprecated)
{
- reflection_object *intern;
- zend_constant *ref;
-
- ZEND_PARSE_PARAMETERS_NONE();
-
- GET_REFLECTION_OBJECT_PTR(ref);
-
- RETURN_BOOL(ZEND_CLASS_CONST_FLAGS(ref) & ZEND_ACC_DEPRECATED);
+ _class_constant_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_DEPRECATED);
}
/* {{{ reflection_class_object_ctor */