The access modifier is the most important feature of the OO language and it is used to restrict the function and classes to be accessed. The list of the access modifiers are:
Public
Class properties and methods, that are set to be public, can be accessed anywhere in the PHP script, in other words everywhere.
Private
Class properties and methods, that are set to be private, can only be accessed within a class, in other words only in which it is defined.
Protected
Class properties and method, that are set to be protected, can only be accessed inside the class and by its subclasses, in other words its class and sub classes.