So I am thinking of doing my PHP in OO way. Can someone tell me the advantage/ disadvantage of this? I think one advantage will be that my codes will be cleaner and easier to maintain. What about performance? How does doing PHP in OO way compare to just writing codes in non-OO way.
My idea of an OO style is, for example, when handling e-mail. I can just do mail(.....)
. But instead, I will create a class called EmailManager
. It will work something like this
EmailManager em = new EmailManager();
em.addSender("[email protected]");
and so on...