Use of Comment Function in PHP


 

Use of Comment Function in PHP

Use of Comment: In this tutorial you will know about comments, why should we use comment and how? Find different types of comments used in PHP.

Use of Comment: In this tutorial you will know about comments, why should we use comment and how? Find different types of comments used in PHP.

Use of Comments Function PHP

Sometimes we need to hide some text in a program, at that case we should put all those codes within comments. Line of Comments generally use for putting important information of variables, functions and other. This is useful when you are working in a group, and other team member may need to use your coding, it is also useful if you are working alone, comments keep you remembering about each details of the program.

Example of PHP Comments Function Uses:

<?php

//echo "This is single line comment";

#echo "This is another type of single line comment";

/*

* This

* is

* called

* Multiple

* Line

* comment*/

echo "This is not a comment";

?>

Output:

This is not a comment

Ads