So I'm trying to do some optimization on my application and I wanted to get some feedback from my fellow php'rz.
I have a parsing application that has quite a few classes and each has its own functionality to shred and store data in mysql. So in my classes that require DB connections I usually create a mysqli object to handle it all. Here is where my question is:
is that bad? is there a more efficient way to do it rather than create a new mysqli object on each constructor and closing it on the destructor?
Thoughts? feelings? advice? Thanks in advance 🙂