PHP team coding standards & code style standards
1. Basic Agreement
1. Source file
(1). Pure PHP code source files only use the <?php tag, omitting the closing tag ?> ;
(2). The encoding format of the PHP code in the source file must be UTF-8 format without BOM;
(3), use Unix LF (line feed) as the line terminator;
(4). A source file only makes one type of declaration, that is, this file is specially used to declare Class, and that file is specially used to set configuration information. Don’t mix them together. Write together;
2. Indentation
Use the Tab key to indent, and set the length of each Tab key to 4 spaces;
3. OK
It is recommended to write a maximum of 120 characters in one line. If it exceeds this number, it should be broken. This can be set by a general editor.
4. Keywords and True/False/Null
PHP keywords must be lowercase, and boolean values: true, false, and null must also be lowercase.
The following are the "keywords" of PHP, which must be lowercase:
Statement:
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn