What is encapsulation with simple example in php?
Wrapping up of data inside single unit is called encapsulation. Means class members such as method and properties binds together inside a class to avoid accessibility from outside.This is done by making variables and functions of class private.