diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-14 11:48:06 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-14 11:48:06 +0100 |
commit | ec694a9e814fdf87ac928ca2458df534c34da540 (patch) | |
tree | b3a165bab08182b01d401b73a2ca4c7075218d1e /Zend/zend_builtin_functions.c | |
parent | 4474cf43e6ba4faa33e66146bfa2859e1094b32f (diff) | |
parent | 1a5cff334d5f93336f3ee645dd73c9297ed24056 (diff) | |
download | php-git-ec694a9e814fdf87ac928ca2458df534c34da540.tar.gz |
Merge branch 'PHP-7.4'
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r-- | Zend/zend_builtin_functions.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 5b43d36cbe..c59b08b583 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1206,26 +1206,16 @@ ZEND_FUNCTION(get_class_methods) (((mptr->common.fn_flags & ZEND_ACC_PROTECTED) && zend_check_protected(mptr->common.scope, scope)) || ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) && - scope == mptr->common.scope)))) { - size_t len = ZSTR_LEN(mptr->common.function_name); - - /* Do not display old-style inherited constructors */ - if (!key) { + scope == mptr->common.scope))) + ) { + if (mptr->type == ZEND_USER_FUNCTION && + (!mptr->op_array.refcount || *mptr->op_array.refcount > 1) && + key && !same_name(key, mptr->common.function_name)) { + ZVAL_STR_COPY(&method_name, zend_find_alias_name(mptr->common.scope, key)); + zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name); + } else { ZVAL_STR_COPY(&method_name, mptr->common.function_name); zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name); - } else if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0 || - mptr->common.scope == ce || - zend_binary_strcasecmp(ZSTR_VAL(key), ZSTR_LEN(key), ZSTR_VAL(mptr->common.function_name), len) == 0) { - - if (mptr->type == ZEND_USER_FUNCTION && - (!mptr->op_array.refcount || *mptr->op_array.refcount > 1) && - !same_name(key, mptr->common.function_name)) { - ZVAL_STR_COPY(&method_name, zend_find_alias_name(mptr->common.scope, key)); - zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name); - } else { - ZVAL_STR_COPY(&method_name, mptr->common.function_name); - zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name); - } } } } ZEND_HASH_FOREACH_END(); |