Comments in PHP
A comment is the part of a program that exists only for the human reader. It is stripped out before showing the result of the program. There are two commenting formats in PHP:
Single-line comments:
They are commonly used for short descriptions.
Example
Here are examples of single-line comments.
<!DOCTYPE html> <html> <body> <?php // Here is the single-line comment # hash sign also use for single-line comment ?> </body> </html>
Multiple-line comments
Example
Here are examples of multiple-line comments.
<!DOCTYPE html> <html> <body> <?php /* This is a multiple-lines comment block This is my first paragraph. This is my second paragraph.*/ ?> </body> </html>