If we have a __call on a parent, we should always also have a
__call on the child, so there's no need to perform this walk.
/* Call the top-level defined __call().
* see: tests/classes/__call_004.phpt */
- zend_class_entry *call_ce = object->ce;
-
- while (!call_ce->__call) {
- call_ce = call_ce->parent;
- }
- return zend_get_user_call_function(call_ce, function_name);
+ ZEND_ASSERT(object->ce->__call);
+ return zend_get_user_call_function(object->ce, function_name);
} else if (ce->__callstatic) {
return zend_get_user_callstatic_function(ce, function_name);
} else {