summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 8c19b71d03..d491784600 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -519,7 +519,8 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos);
while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) {
- if (!(mptr->common.fn_flags & ZEND_ACC_STATIC)) {
+ if ((mptr->common.fn_flags & ZEND_ACC_STATIC) == 0 &&
+ ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce)) {
char *key;
uint key_len;
ulong num_index;
@@ -539,6 +540,9 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
zend_hash_move_forward_ex(&ce->function_table, &pos);
}
string_printf(str, "\n%s - Methods [%d] {", indent, count);
+ if (!count) {
+ string_printf(str, "\n");
+ }
string_append(str, &dyn);
string_free(&dyn);
} else {