Quote Originally Posted by McGruff
Such as?

OOP - particularly OOP combined with testing - is a much more powerful way to work. I can understand if it looks over-complicated or unecessary on first contact (I thought that when I was starting out) but statements such as above can be very misleading for people who are trying to learn. You don't have to, of course. Php is a bus you can hop on and off anywhere you like. But if you do want to learn to produce the best quality code you possibly can, OOP and testing is the way to go. We'd be selling people short to pretend that procedural is just as good or that it's all just a matter of personal preference.
You're right about testing: if you write tests first, you'll end up with cleaner code. (most times at least)

But I don't think OOP helps a lot. It transforms this:




There is ONE genuine use, and that's first class functions. In OOP, it's called the command pattern. You don't need this at all if your language supports first-class-functions.

Can you give me one example where OOP is useful (makes the code better)?

Well, you can't deny that a code is definatly of better quality if it uses one class to handle let's say all the news functions instead of retyping all of the code everytime you need to do something with news.
Ehmm, yes, but now you're comparing copy-and-paste vs oo ;-). You could have created a function library instead of and oo library. No need for rewrite in either case.