Home >Backend Development >PHP Tutorial >Detailed explanation of php single-line comments and multi-line comments

Detailed explanation of php single-line comments and multi-line comments

小云云
小云云Original
2018-01-24 13:04:0310668browse

This article mainly introduces PHP language comments, single-line comments and multi-line comments. Friends who need it can refer to it. I hope it can help friends who have just started to PHP better learn and master PHP single-line comments and multi-line comments.

1. PHP single-line comment:

PHP comment symbol: //

PHP single-line comment example:


<?php
//输出 脚本之家
echo 脚本之家";
?>

2. PHP multi-line comments

PHP multi-line comment symbols: /* */

PHP multi-line comment example:


<?php
/*输出 脚本之家
脚本之家是国内专业的网站建设资源、脚本编程学习类网站,提供asp、php、asp.net、javascript、jquery、vbscript、dos批处理、网页制作、网络编程、网站建设等编程资料。
*/
?>

Basically that’s it, very basic, but easy to forget.

Related recommendations:

Summary sharing of PHP comment syntax specifications and naming specifications

How to use horizontal line annotations and code comments in HTML

javascript matches the regular expression code commented in js

The above is the detailed content of Detailed explanation of php single-line comments and multi-line comments. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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