Home > Backend Development > PHP Tutorial > PHP (2) Program annotation method

PHP (2) Program annotation method

黄舟
Release: 2023-03-04 11:12:01
Original
1871 people have browsed it

PHP has three comment symbols:

1. Multi-line comment symbols closed with "/*" and "*/",

2. Single-line comments starting with "//",

3. Single-line comments starting with "#".

Comments must be written above or to the right of the commented code, not below the code. The following example:

<?php
#这是单行注释
echo "单行注释"; // 这是单行注释
?>
Copy after login

Multi-line comments are as follows:

<?php
echo "多行注释";
/*
这是多行注释
这是多行注释
*/
?>
Copy after login

The above is the PHP (2) program comment method Content, please pay attention to the PHP Chinese website (m.sbmmt.com) for more related content!


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