The implementation of the PHP object:
Note: object names are best named by the object name. class.php.
1. For members of static classes that cannot use $this-> to invoke members and functions of their static classes, they should be invoked using self:: Member or method;
2. For new classes that inherit static classes, the static methods of the parent class need to be called, and should be invoked using the static members and methods of the parent:: Subclass.
3. When defining a class constant, it is defined with a const and cannot be defined with define. Use also needs to be accessed using the self:: constant member.
The implementation of PHP interface
- The name of the interface is best named with the i+ interface name. php.
- Each implementation of the interface's classes is required;
The implementation of PHP's abstract class
- Use the abstract keyword;
- The method of the abstract class must be implemented;
PHP Objects and interfaces abstract class considerations