PHP: What is the purpose of encapsulation?

Gavimath

New Member
I'm talking specifically about the public, private and protected keywords that can apply to properties and methods. I've looked everywhere and I know what they do and how to use them, but don't see how they would be practical when programming. Could somebody explain or give an example?
 
Back
Top