summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-23 15:47:23 +0000
committerMarcus Boerger <helly@php.net>2003-08-23 15:47:23 +0000
commit5e77dc44dc72df6994c20e034b2f48f93bfca6ae (patch)
tree4aa5bc633ba60769e816ca6b4c24f4d26a004665
parentfbda310a41299913e39385f15762924bde2f48cb (diff)
downloadphp-git-5e77dc44dc72df6994c20e034b2f48f93bfca6ae.tar.gz
Show ctor/dtor information and those don't return anything
-rw-r--r--Zend/zend_reflection_api.c8
-rw-r--r--ext/reflection/php_reflection.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index 6664e347ba..2710e83518 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -356,6 +356,12 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM
string_printf(str, fptr->common.scope ? "%sMethod [ " : "%sFunction [ ", indent);
string_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? "<user> " : "<internal> ");
+ if (fptr->common.fn_flags & ZEND_ACC_CTOR) {
+ string_printf(str, "<ctor> ");
+ }
+ if (fptr->common.fn_flags & ZEND_ACC_DTOR) {
+ string_printf(str, "<dtor> ");
+ }
if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) {
string_printf(str, "abstract ");
}
@@ -380,7 +386,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) {
+ if (fptr->op_array.return_reference && !(fptr->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR))) {
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 6664e347ba..2710e83518 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -356,6 +356,12 @@ static void _function_string(string *str, zend_function *fptr, char* indent TSRM
string_printf(str, fptr->common.scope ? "%sMethod [ " : "%sFunction [ ", indent);
string_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? "<user> " : "<internal> ");
+ if (fptr->common.fn_flags & ZEND_ACC_CTOR) {
+ string_printf(str, "<ctor> ");
+ }
+ if (fptr->common.fn_flags & ZEND_ACC_DTOR) {
+ string_printf(str, "<dtor> ");
+ }
if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) {
string_printf(str, "abstract ");
}
@@ -380,7 +386,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) {
+ if (fptr->op_array.return_reference && !(fptr->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR))) {
string_printf(str, "&");
}
string_printf(str, "%s ] {\n", fptr->common.function_name);