diff options
| author | Marcus Boerger <helly@php.net> | 2003-05-29 19:00:40 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2003-05-29 19:00:40 +0000 |
| commit | 472cc5b9f3bc7dc942df16460af66f8c65a7b217 (patch) | |
| tree | 638bdf39e53e5b04d3b97e8a787d7d35f2c0a507 /Zend/zend_operators.c | |
| parent | 66bc801998fc4ccb6a77aad252e211cee301ee51 (diff) | |
| download | php-git-472cc5b9f3bc7dc942df16460af66f8c65a7b217.tar.gz | |
Faster interface inheritance & faster inheritance checks
Diffstat (limited to 'Zend/zend_operators.c')
| -rw-r--r-- | Zend/zend_operators.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 20a967197d..9238857be0 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1431,16 +1431,15 @@ ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class { zend_uint i; + for (i=0; i<instance_ce->num_interfaces; i++) { + if (instanceof_function(instance_ce->interfaces[i], ce TSRMLS_CC)) { + return 1; + } + } while (instance_ce) { if (instance_ce == ce) { return 1; } - for (i=0; i<instance_ce->num_interfaces; i++) { - - if (instanceof_function(instance_ce->interfaces[i], ce TSRMLS_CC)) { - return 1; - } - } instance_ce = instance_ce->parent; } |
