Hi Mark, > If it doesn't affect performance *MUCH* then I'm all for it ! It can > bring better structure for complex designs. Also by reusing, I'm > assuming less memory will be needed for the code base which is beneficial. the current implementation does not save any memory compared to a user-level copy'n'past solution. But there might be the opportunity to optimize the op_array handling.
The performance impact is almost the same for a trait usage as for inheritance or interface definitions. The only costly operation is copying the method body from the trait to the class where it is used. But this should be much cheaper than parsing the method for each single class, what would be necessary if one would use a good old copy'n'past approach. Kind Regards Stefan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php