Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
zend_do_inheritance() copies all functions from the parent class function table into the inherited class function table. Therefore, if a parent has implemented a function, it will be present in its child's function table.
As a consequence, we don't have to traverse all zend_class_entries and look for the function: if it is defined by a parent, we will see it in our scope.
Thus, if we don't look up the scope, we
For usual method calls and static self:: calls we don't need phalcon_find_scope() at all —
EG(scope) = Z_OBJCE_P(obj)
is sufficient.For parent calls we only need to check if our class is present in the inheritance of the given
this_ptr
.It will be faster to compare zend_class_entries than class names though (I will probably address this later).