summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-02-02 19:53:32 +0000
committerJakub Zelenka <bukka@php.net>2015-02-02 19:53:32 +0000
commit3e4c1717ee4f4beb9c362942a113b90fff0a7fb0 (patch)
treef5da1649f6cfb5ae06b09b9cab4fd19a4446a767 /ext/reflection/php_reflection.c
parentb65205028a2debc50c3e2ca1572da4c74ac87834 (diff)
parent92576c7c49a3c104bc4aea4cfa378a029bb26c86 (diff)
downloadphp-git-3e4c1717ee4f4beb9c362942a113b90fff0a7fb0.tar.gz
Merge branch 'master' into jsond
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index c95ec0d81e..9f5ad8cdd4 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -907,6 +907,24 @@ static void _function_string(string *str, zend_function *fptr, zend_class_entry
}
_function_parameter_string(str, fptr, param_indent.buf->val);
string_free(&param_indent);
+ if (fptr->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
+ string_printf(str, " %s- Return [ ", indent);
+ if (fptr->common.arg_info[-1].class_name) {
+ string_printf(str, "%s ",
+ (fptr->type == ZEND_INTERNAL_FUNCTION) ?
+ ((zend_internal_arg_info*)(fptr->common.arg_info - 1))->class_name :
+ fptr->common.arg_info[-1].class_name->val);
+ if (fptr->common.arg_info[-1].allow_null) {
+ string_printf(str, "or NULL ");
+ }
+ } else if (fptr->common.arg_info[-1].type_hint) {
+ string_printf(str, "%s ", zend_get_type_by_const(fptr->common.arg_info[-1].type_hint));
+ if (fptr->common.arg_info[-1].allow_null) {
+ string_printf(str, "or NULL ");
+ }
+ }
+ string_printf(str, "]\n");
+ }
string_printf(str, "%s}\n", indent);
}
/* }}} */
@@ -3978,6 +3996,7 @@ static int _adddynproperty(zval *ptr, int num_args, va_list args, zend_hash_key
if (zend_get_property_info(ce, hash_key->key, 1) == NULL) {
zend_property_info property_info;
+ property_info.doc_comment = NULL;
property_info.flags = ZEND_ACC_IMPLICIT_PUBLIC;
property_info.name = hash_key->key;
property_info.ce = ce;