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.

Link to comment
Share on other sites

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!  ;)

Link to comment
Share on other sites

  • 2 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.