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)); } /* }}} */