Discussion on Object Oriented Programming in PHP

191-35-2765

191-35-2765

by Sristy Saha -
Number of replies: 0

Object-oriented languages are good when you have a fixed set of operations on things, and as your code evolves, you primarily add new things. This can be accomplished by adding new classes which implement existing methods, and the existing classes are left alone.

Functional languages are good when you have a fixed set of things, and as your code evolves, you primarily add new operations on existing things. This can be accomplished by adding new functions which compute with existing data types, and the existing functions are left alone.

To put it simply, When you’re working across different boundaries, OOP is an excellent method to keep everything packaged up and secure from unwanted external usage. Where as, Functional programming works well when complexity is contained.