3 ms·
Isn’t that the same behavior/pattern for traits though? At least it’s consistent.
by donatj 5y ago
Isn’t that the same behavior/pattern for traits though? At least it’s consistent.
- pdenton 5y agoThat was easy to test, and no. class_exists returns false for traits and they can't be used as parameter types. It throws a TypeError when I do that (even though the instance I pass uses the trait).