mirror of
https://github.com/php/php-src.git
synced 2024-12-19 06:50:17 +08:00
Merge branch 'PHP-7.4'
This commit is contained in:
commit
fec0ff8cb0
@ -40,7 +40,7 @@ var_dump($example->propertyBarExists());
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
bool(false)
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
|
@ -1148,7 +1148,11 @@ ZEND_FUNCTION(method_exists)
|
|||||||
zend_string_release_ex(lcname, 0);
|
zend_string_release_ex(lcname, 0);
|
||||||
|
|
||||||
if (func) {
|
if (func) {
|
||||||
RETURN_BOOL(!(func->common.fn_flags & ZEND_ACC_PRIVATE) || func->common.scope == ce);
|
/* Exclude shadow properties when checking a method on a specific class. Include
|
||||||
|
* them when checking an object, as method_exists() generally ignores visibility.
|
||||||
|
* TODO: Should we use EG(scope) for the object case instead? */
|
||||||
|
RETURN_BOOL(Z_TYPE_P(klass) == IS_OBJECT
|
||||||
|
|| !(func->common.fn_flags & ZEND_ACC_PRIVATE) || func->common.scope == ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Z_TYPE_P(klass) == IS_OBJECT) {
|
if (Z_TYPE_P(klass) == IS_OBJECT) {
|
||||||
|
@ -68,10 +68,10 @@ Does C::non_existent exist? bool(false)
|
|||||||
---(Using object)---
|
---(Using object)---
|
||||||
Does C::inherit_pub exist? bool(true)
|
Does C::inherit_pub exist? bool(true)
|
||||||
Does C::inherit_prot exist? bool(true)
|
Does C::inherit_prot exist? bool(true)
|
||||||
Does C::inherit_priv exist? bool(false)
|
Does C::inherit_priv exist? bool(true)
|
||||||
Does C::inherit_static_pub exist? bool(true)
|
Does C::inherit_static_pub exist? bool(true)
|
||||||
Does C::inherit_static_prot exist? bool(true)
|
Does C::inherit_static_prot exist? bool(true)
|
||||||
Does C::inherit_static_priv exist? bool(false)
|
Does C::inherit_static_priv exist? bool(true)
|
||||||
Does C::pub exist? bool(true)
|
Does C::pub exist? bool(true)
|
||||||
Does C::prot exist? bool(true)
|
Does C::prot exist? bool(true)
|
||||||
Does C::priv exist? bool(true)
|
Does C::priv exist? bool(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user