Skip to content

Conversation

nielsdos
Copy link
Member

No description provided.

}
}
} ZEND_HASH_FOREACH_END();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but maybe this should use zend_foreach_op_array() instead. It's not currently ZEND_API though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something for master

if (prop->hooks[i]) {
op_array = &prop->hooks[i]->op_array;
ZEND_ASSERT(op_array->type == ZEND_USER_FUNCTION);
if (!(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this condition not necessary for normal class methods?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition is not necessary for this loop either. It's just an optimization we could apply to the other place too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, makes sense. Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants