diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-25 10:45:42 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-25 10:51:17 +0200 |
commit | c858d17f06179aa25f6e8aa06965313fd519d8e9 (patch) | |
tree | de199c2dada0099a344ff595cf024958f98caa5b /Zend/zend_interfaces.c | |
parent | bd7b1afd6eb623a4905673dfc92bb0de62f23edd (diff) | |
download | php-git-c858d17f06179aa25f6e8aa06965313fd519d8e9.tar.gz |
Optimize instanceof_function
Split out the simple equality check into an inline function --
this is one of the common cases.
Replace instanceof_function_ex with zend_class_implements_interface.
There are a few more places where it may be used.
Diffstat (limited to 'Zend/zend_interfaces.c')
-rw-r--r-- | Zend/zend_interfaces.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 5d58b3e178..d2b96e6bf3 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -512,7 +512,7 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e { if (class_type->parent && (class_type->parent->serialize || class_type->parent->unserialize) - && !instanceof_function_ex(class_type->parent, zend_ce_serializable, 1)) { + && !zend_class_implements_interface(class_type->parent, zend_ce_serializable)) { return FAILURE; } if (!class_type->serialize) { |