access modifier in PHP

The visibility of a property, a method or a constant can be defined by prefixing the declaration with the keywords public, protected or private. 
Access modifier | Meaning
----- | -----
public | Class members declared public can be accessed everywhere. 
protected | Members declared protected can be accessed only within the class itself and by inheriting and parent classes. 
private | Members declared as private may only be accessed by the class that defines the member.