Jump to content

OOP or standard PHP


themistral

Recommended Posts

Hi,

 

I am not really familiar with OOP programming and was wondering how it differs from standard PHP.

 

My understanding is that the only difference is that OOP uses classes...is that correct?

 

And what are the any advantages of using OOP over standard PHP?

Is it processed quicker by the server?

Link to comment
Share on other sites

OOP has a lot of advantages. Procedural code is written more quickly and processes quicker, but OOP is much more organized, maintainable, and easy to extend on. You can also reuse classes with very little to no editing. So if your coding something that you know you can reuse over and over in the future, it would definitely be worth using OOP for it.

Link to comment
Share on other sites

Thanks pocobueno1388!

 

I already use functions for bits of code I use over and over again so I guess using a class takes me one stage further as it looks like you group various functions to get all the information you need rather than running a few separate functions.

 

It makes sense!

 

Do people treat you as a more serious coder if using OOP techniques?

Link to comment
Share on other sites

OK thanks!

 

I've used osCommerce and phpBB which both use OOP but never started any OOP from scratch - out of curiosity, is there a good beginners tutorial you know of - I know I can search google and I will - but if there is a particular one you would recommend, then I'd appreciate it!

Link to comment
Share on other sites

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.