Home > Backend Development > PHP Problem > There are several types of comments in php

There are several types of comments in php

王林
Release: 2023-03-13 08:48:01
Original
14174 people have browsed it

There are three types of comments in php, namely: 1. Single-line comment [//]; 2. Single-line comment [#]; 3. Multi-line comment [/**&*/]. Comments in PHP will not be read and executed as a program, their function is to be read by code editors.

There are several types of comments in php

The operating environment of this article: windows10 system, php&7, thinkpad&t480 computer.

Any programming language has its own programming annotation method. Comments are very useful, not only for debugging the program, but also for describing the function of the code.

There are three kinds of comments in php:

1, &//& This is a single line comment

2, #& This is also a single line comment

3,/*&*/Multi-line comment block

/*
This is a multi-line comment block
It spans
multiple lines
*/

PHP& Comments in the code will not be read and executed as a program. Its only purpose is to be read by code editors.

Recommended learning: php training

The above is the detailed content of There are several types of comments in php. For more information, please follow other related articles on the PHP Chinese website!

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