I. File naming rules: 1: The class file name ends with. class. php. For example, Helper. class. php2: A class file only defines one public class, and the file name is the same as the class name. For example, in the Helper. class. php file, publicclassHelper {spanstylewhite-space: prespan...} 3: The function library file name is closed in. func. php.
I. File naming rules: 1: The class file name ends with. class. php. For example, Helper. class. php 2: A class file only defines one public class, and the file name is the same as the class name. For example, in the Helper. class. php file, public class Helper {span style = white-space: pre/span...} 3: The function library file name is closed in. func. php.
I. File naming rules:
1: The class file name ends with. class. php. For example, Helper. class. php
2: A class file only defines one public class, and the file name is the same as the class name. For example, in the Helper. class. php file,
public class Helper {
....
}
3: The function library file name ends with. func. php. For example, global. func. php
4: the configuration file is named config. php. [of course, it must be determined based on the current development context]
Ii. Method naming rules:
1: Name the function library method: it is all lowercase + underline, verb + noun. For example: function get_users (){}
2. class-based naming: The camper naming method is used: Verb + noun. For example, function getName (){}
3: class private method naming: Using underline + camper: Verb + noun. For example: function _ listToTree (){}
Iii. variable naming rules:
1: class attributes: named after the hump, $ templateFile
2: internal variables of the method: Type + lowercase + underline, for example, $ ashop_result; (representing the array returned by the shop Table query)
F (floating point number), s (string), a (array), B (Boolean value), I (integer number), o (Instance Object ).
Iv. Writing specifications:
1: The left parentheses of braces do not occupy one row independently, and the right parenthesis occupies one row independently and the subject is at the same level.
2: if-else must be wrapped in.
3: four spaces are used for indentation. (A tab must represent four spaces)
The above is only the code specification that I use for my own time.