PHP Classes / Objects vs Functions

We’ve been having a big debate in our office recently on whether we should be using Classes and Objects as a method of best practice in our PHP coding standards, or whether instead we should stick to using functions and avoid objects like the plague. I have been searching the web for other peoples views on the issue, and I eventually found this great article over on You should read it if only for the comical but accurate descriptions of the procedural fanatic and the object fanatic.

Zend Technologies – Articles – The Best Tool For The Job: OO versus Procedural Programming in PHP

The general conclusion is that there is a time and a place for both programming methods, with procedural techniques better suited for building low overhead, tight and fast code, whereas object orientated techniques are better for making code that is re-useable and more flexible.

Leave a Reply

Your email address will not be published. Required fields are marked *