I am working my way through building a totally OOP platform to replace my previous procedural files. I am having trouble deciding how to implement utility functions though. Many, many classes or views (as in mvc views) require me to echo out text, or format text in a certain way over and over. I'd like to have a wrapper for functions like htmlspecialchars, var-dump, and other very often used functions, along with my own utility functions, but I don't know where to put these. Right now I have 3 options:
1) separate utility class composed of static functions
2) separate utility class composed of non-static functions
3) traits which I include on every class that that needs a utility
What is the best way to approach this? Instantiating the utility function class composed of non-static functions and then calling the appropriate method seems like the most OOP way, but it also will blow up my code's size quite a bit due to all that extra typing.