5 声明_PHP

WBOY
Release: 2016-06-01 12:38:47
Original
902 people have browsed it

推荐一行一个声明,因为这样以利于写注释。亦即,


int $level; // 缩进的程度
int $size; // 由制表符决定

要优于,

int $level, $size;

不要将不同类型变量的声明放在同一行,例如:


int $foo, $fooarray[]; //错误

注意:上面的例子中,在类型和标识符之间放了一个空格,另一种被允许的替代方式是使用制表符:


int $level; // 缩进的程度
int $size; // 由制表符决定
$currentEntry; // 通常选择制表符作为缩进的标准

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template