php access control instructions: Access control to properties or methods is achieved by adding the keywords public, protected or private in front. Class members defined by public can be accessed from anywhere; Class members defined by protected can be accessed by subclasses and parent classes of the class in which they are located (of course, the class in which the member is located can also be accessed); Class members defined by private can only be accessed by the class in which they are located. |