summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_reflection_api.c2
-rw-r--r--ext/reflection/php_reflection.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index 21c8bf95f7..f5a0e6cd7f 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -388,7 +388,7 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM
}
string_printf(str, fptr->common.scope ? "method " : "function ");
- if (fptr->op_array.return_reference && !(fptr->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR))) {
+ if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.return_reference) {
string_printf(str, "&");
}
string_printf(str, "%s ] {\n", fptr->common.function_name);
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 21c8bf95f7..f5a0e6cd7f 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -388,7 +388,7 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM
}
string_printf(str, fptr->common.scope ? "method " : "function ");
- if (fptr->op_array.return_reference && !(fptr->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR))) {
+ if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.return_reference) {
string_printf(str, "&");
}
string_printf(str, "%s ] {\n", fptr->common.function_name);