Home > php教程 > php手册 > body text

PHP 编码规范(18)

WBOY
Release: 2016-06-13 10:20:48
Original
950 people have browsed it

7.1 空行

空行将逻辑相关的代码段分隔开,以提高可读性。

下列情况应该总是使用两个空行:
- 一个源文件的两个片段(section)之间
- 类声明声明之间

下列情况应该总是使用一个空行:
- 两个方法之间
- 方法内的局部变量和方法的第一条语句之间
- 块注释或单行注释之前
- 一个方法内的两个逻辑段之间,用以提高可读性


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template