Home > php教程 > php手册 > PHP注释实例技巧

PHP注释实例技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:26:56
Original
977 people have browsed it

复制代码 代码如下:


$a = 1;
$b = 2;
if (1==1) {
$andy = '帅哥';
}
?>


一般注释的时候,用

复制代码 代码如下:


/*
$a = 1;
$b = 2;
*/
if (1==1) {
$andy = '帅哥';
}
?>


调程序的时候,老要把后面的*/拿到前面去,很麻烦

复制代码 代码如下:


/**/
$a = 1;
$b = 2;
if (1==1) {
$andy = '帅哥';
}
?>


现在应该这样写
这样是注释掉

复制代码 代码如下:


/**
$a = 1;
$b = 2;
if (1==1) {
$andy = '帅哥';
}
/**/

?>
这样是不注释

复制代码 代码如下:


/**/
$a = 1;
$b = 2;
if (1==1) {
$andy = '帅哥';
}
/**/
?>


再附上一个小规范
所有php文件,末尾都不要
?>
这样可以避免有空白输出
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template