From 113269a54bcee1bff593d5011a70186100016f60 Mon Sep 17 00:00:00 2001 From: arshidkv12 Date: Wed, 24 Jun 2026 18:59:13 +0530 Subject: [PATCH] ext/Reflection: Simplify ReflectionClass::hasConstant() --- ext/reflection/php_reflection.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index a208741b1590..f5b1cb2010a0 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4762,11 +4762,7 @@ ZEND_METHOD(ReflectionClass, hasConstant) } GET_REFLECTION_OBJECT_PTR(ce); - if (zend_hash_exists(&ce->constants_table, name)) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } + RETURN_BOOL(zend_hash_exists(&ce->constants_table, name)); } /* }}} */