Tag

Comment

Browsing

In the last example, We learn about single line comment. In this example, We are going to learn PHP multi-line comments. In multi-line comment PHP allow us to write multiple lines as a comment. Every developer must write the comment. So, another developer easily understands the code.

PHP multi-line comments

First of all, We are going to create a new PHP file for multi-line comment example. So, Let’s create a new file at “C:\xampp\htdocs\first\thecodignstuff.php” then write the below code.

Finally, We are ready with a multi-line comment example. So, Let’s run the file and check the output like

Hello World!20

The comments are not visible on output it’s only usable for a developer. If you face any issue on this example write the comment below.

PHP stands for Personal Home Page. PHP also was known as Hypertext processor language. Today, We are going to learn PHP Single Line comment example. Every language provides comment system. A developer must have habits to write down comment before writing the code. So, when another developer starts working or trying to read code his easily understand.

PHP Single Line comment

Every developer must have habits to write the comment. Let’s see, How we can write the single line comment on PHP. So, First of all, We are going to create a PHP file at “C:\xampp\htdocs\first\comment.php” then write the code like

When we run our example our output something looks like this.

Hello World!20

The Comments are not visible to the user. it’s only for developer use. If you face any issue on this example please write the comment below.