3.2 Introduction Statement
The import statement should be located at the head of the file and explain the role of the imported file when introducing it. For example:
//Database operation class
require( “db.php” );
3.3 Class declaration
1 Class documentation comment (/**……*/) For information that needs to be included in this comment, see "Documentation Comments"
2 Class declaration
3 Class implementation comment (/**/) If necessary, this comment should contain any information about the entire class that is not suitable as a class documentation comment.
4 Class (static) variables First are the public variables of the class, then are the protected variables, then are the package-level variables (without access modifier, access modifier), and finally are the private variables.
5 Instance variables are first at the public level, then at the protection level, then at the package level (without access modifiers), and finally at the private level.
6 Constructors
7 Methods These methods should be grouped by functionality, not scope or access rights. For example, a private class method can be placed between two public instance methods. Its purpose is to make it easier to read and understand the code