OOP stands for Object-Oriented Programming. Object-oriented programming is about creating objects that contain both data and functions, this is different from Procedural programming which is about writing procedures or functions that perform operations on the data.
NB:You can test the code in this article at One Compiler
Why OOP?
- OOP is faster and easier to execute
- OOP provides a clear structure for the programs
- OOP helps to keep the PHP code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug
- OOP makes it possible to create full reusable applications with less code and shorter development time
Top comments (0)