Jump to content

which is better ? php oop (object oriented programming) or regular php


immortality

Recommended Posts

this is an age-old debate but the truth is they both have their pros and cons. i think we could answer your question more accurately if we knew what you were trying to build. for php, i personally prefer procedural code, or as you put it, the normal method. oop never really made much sense to me in any other language except javascript and python.

Hi,

 

I asked this question on the OOP board and I am going to learn OOP - but I think it depends on the type of site you are building as boo_lolly said.

 

At the moment I use procedural code with functions for reusable code. Once I have got my head around OOP then I will probably use it for big sites I code that reuse a lot of the same code on different pages.

For small sites I will probably still use procedural code.

 

It wouldn't hurt to know both and then make the choice depending on the site you are coding!

 

Just my 2 pence worth!  ;)

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.