Commit a1cd11ad0d0 for php.net
commit a1cd11ad0d022c139cf1ed968514f91b53b03478
Author: Daniel Scherzer <daniel.e.scherzer@gmail.com>
Date: Sun Jul 19 09:58:22 2026 -0700
`ReflectionMethod::getPrototype()`: add parentheses to error message
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index a068f9f48ac..bba42bdfcc1 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3728,7 +3728,7 @@ ZEND_METHOD(ReflectionMethod, getPrototype)
if (!mptr->common.prototype) {
zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Method %s::%s does not have a prototype", ZSTR_VAL(intern->ce->name), ZSTR_VAL(mptr->common.function_name));
+ "Method %s::%s() does not have a prototype", ZSTR_VAL(intern->ce->name), ZSTR_VAL(mptr->common.function_name));
RETURN_THROWS();
}
diff --git a/ext/reflection/tests/bug74949.phpt b/ext/reflection/tests/bug74949.phpt
index 20e0fc00e10..858e766c014 100644
--- a/ext/reflection/tests/bug74949.phpt
+++ b/ext/reflection/tests/bug74949.phpt
@@ -21,4 +21,4 @@
Method [ <internal> public method __invoke ] {
}
-Method Closure::__invoke does not have a prototype
+Method Closure::__invoke() does not have a prototype