diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-02 11:05:04 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-02 11:05:04 +0200 |
commit | b5991d3382a63079524cf777c0bc43f1cc9c837c (patch) | |
tree | c172bb050538b55937069b08f12ac1540fd2a4b8 /ext/reflection/php_reflection.c | |
parent | 5430a466ff31422b436df076581d8345531db975 (diff) | |
download | php-git-b5991d3382a63079524cf777c0bc43f1cc9c837c.tar.gz |
Show property type in reflection export
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index e3d16fd3e0..018f97e462 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -595,7 +595,8 @@ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_ } if (ZEND_TYPE_IS_SET(arg_info->type)) { zend_string *type_str = zend_type_to_string(arg_info->type); - smart_str_append_printf(str, "%s ", ZSTR_VAL(type_str)); + smart_str_append(str, type_str); + smart_str_appendc(str, ' '); zend_string_release(type_str); } if (ZEND_ARG_SEND_MODE(arg_info)) { @@ -843,6 +844,12 @@ static void _property_string(smart_str *str, zend_property_info *prop, const cha if (prop->flags & ZEND_ACC_STATIC) { smart_str_appends(str, "static "); } + if (ZEND_TYPE_IS_SET(prop->type)) { + zend_string *type_str = zend_type_to_string(prop->type); + smart_str_append(str, type_str); + smart_str_appendc(str, ' '); + zend_string_release(type_str); + } if (!prop_name) { const char *class_name; zend_unmangle_property_name(prop->name, &class_name, &prop_name); |