Are most CMS written with OO PHP?

I just started to know about CMS, and found the ones I saw are all written using OO PHP. Are most CMS written with OO PHP? Or let’s put it this way, using OO PHP to write a CMS is far more effective than using procedural PHP, right?

Yes and yes. Procedural becomes “spaghetti code” once you are working on something like a Wordpress. If you needed to make a structural change, it would take days to fix all the code if it weren’t object oriented.

thanks, then i need to first get the hang of OO PHP, then download and learn some CMS source code, right?

I love OOP, I write pretty much everything in it. As for the CMS you should be able to write your own when you get the hang of OOP. Its pretty easy.

If they are written in OOPHP its for a reason, dont you think? Just as threehundred said, Procedural programming leads to spaghetti code. Procedural programming is for amateurs, while OOP is professional standard. Unless you are working on a small hobbist site, its never a good idea to use procedural programming.

Tell that to the people responsible for maintaining the php c source…

If you are using a language that supports OOP than you *should be writing OOP code. Object oriented logic is *typically increasingly more maintainable and flexible than procedural code. Unless you are writing software where microseconds matter than you should probably be using OOP and if you are writing software where microseconds matter than you probably wouldn’t be using php to begin with.