-1

Functions using inside class and without the class, both have similar levels of work for small projects. Then why do professionals suggests to use classes instead of using simple direct function in PHP?

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

0

functions/methods in OOP can have access to properties defined in their class, while procedural function just have access to global valuables and their own local variables, I think that's more precise?