Skip to main content
Copy edited (e.g. ref. <https://en.wiktionary.org/wiki/let%27s#Contraction> and <http://en.wikipedia.org/wiki/PHP>). Changed to sentence casing for the title.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Why Useuse PHP OOP over Basic Functionsbasic functions and Whenwhen?

There are some posts about this matter, but I didn't clearly get when to use Object Orientedobject-oriented coding and when to use programmatic functions in an include. Somebody also mentioned to me that OOP is very heavy to run, and makes more workload. Is this right?

LetsLet's say I have a big file with 50 functions, why. Why will I want to call these in a class? andAnd not by function_name().? Should I switch and create an object which holds all of my functions? What will be the advantage or specific difference? What benefits does it bring to code OOP in php PHP? Modularity?

Why Use PHP OOP over Basic Functions and When?

There are some posts about this matter, but I didn't clearly get when to use Object Oriented coding and when to use programmatic functions in an include. Somebody also mentioned to me that OOP is very heavy to run, and makes more workload. Is this right?

Lets say I have a big file with 50 functions, why will I want to call these in a class? and not by function_name(). Should I switch and create object which holds all of my functions? What will be the advantage or specific difference? What benefits does it bring to code OOP in php ? Modularity?

Why use PHP OOP over basic functions and when?

There are some posts about this matter, but I didn't clearly get when to use object-oriented coding and when to use programmatic functions in an include. Somebody also mentioned to me that OOP is very heavy to run, and makes more workload. Is this right?

Let's say I have a big file with 50 functions. Why will I want to call these in a class? And not by function_name()? Should I switch and create an object which holds all of my functions? What will be the advantage or specific difference? What benefits does it bring to code OOP in PHP? Modularity?

edited tags
Link
hakre
  • 199.8k
  • 55
  • 454
  • 865
Source Link
Codex73
  • 5.8k
  • 13
  • 58
  • 77

Why Use PHP OOP over Basic Functions and When?

There are some posts about this matter, but I didn't clearly get when to use Object Oriented coding and when to use programmatic functions in an include. Somebody also mentioned to me that OOP is very heavy to run, and makes more workload. Is this right?

Lets say I have a big file with 50 functions, why will I want to call these in a class? and not by function_name(). Should I switch and create object which holds all of my functions? What will be the advantage or specific difference? What benefits does it bring to code OOP in php ? Modularity?