PHP | Access specifiers
An access specifier is a code element that is used to determine which part of the program is allowed to access a particular variable or other information.
There are three types of access specifiers available in PHP they are:
- Private: Members of a class are declared as private and they can be accessed only from that class.
- Protected: The class members declared as protected can be accessed from that class or from the inherited class.
- Public: The class members declared as public can be accessed from everywhere.