mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
reflection: Check against the known string in is_closure_invoke() (#21402)
This can likely succeed by just comparing pointers in a majority of cases.
This commit is contained in:
@@ -191,7 +191,7 @@ static zend_always_inline uint32_t prop_get_flags(const property_reference *ref)
|
|||||||
|
|
||||||
static inline bool is_closure_invoke(const zend_class_entry *ce, const zend_string *lcname) {
|
static inline bool is_closure_invoke(const zend_class_entry *ce, const zend_string *lcname) {
|
||||||
return ce == zend_ce_closure
|
return ce == zend_ce_closure
|
||||||
&& zend_string_equals_literal(lcname, ZEND_INVOKE_FUNC_NAME);
|
&& zend_string_equals(lcname, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE));
|
||||||
}
|
}
|
||||||
|
|
||||||
static zend_function *_copy_function(zend_function *fptr) /* {{{ */
|
static zend_function *_copy_function(zend_function *fptr) /* {{{ */
|
||||||
|
|||||||
Reference in New Issue
Block a user