Page 1 of 1

Help! mysqli question

Posted: Sun Nov 28, 2010 4:35 pm
by osaka_x
Hello, i'm working on a project in PHP, and i'm trying to use the new features like namespace and mysqli (instead of the normal one), etc.

Should i use the procedural style or object oriented style? I want the best performance, and I will adapt to either class or functions.

Right now, i'm using static classes so (i believe) they don't do overhead, and using the mysqli procedural style, but it might be stupid if mysqli internally is a class.

Thanks

Re: Help! mysqli question

Posted: Sun Nov 28, 2010 5:38 pm
by Jonah Bron
Yes, you should start in OOP (object oriented programming). As far as I know, there's no real performance difference between OO and procedural. One of the big advantages of OOP is maintainability. If designed well, OO code is way easier to deal with than procedural code. The key is to know how/when to separate your objects and methods. I think that can only come with experience.