How to Write Comment in PHP
You can write comment in PHP using the symbols //, # and /**/. The Double slash(//) and hash(#) gives you single line comment and text inside the /* and */ gives you multi-line comment. Using comments in your coding is the best practice for any developers to design an code.
PHP Single Line Comment
You can use two symbols # or // at the start of each line of code to make it commented. It’s the simplest way of commenting out a line of code or put a comment at the end of each line to describe the line for its purpose.
//echo "You can check my PHP comment here";
#echo "This is the another way of implementing comment";
echo "How are you today?"; //This is the comment
PHP Multi-Line Comment
You can use PHP multiline comment system to comment out more than one line. Use symbol /* to the start of the comment and */ to the end of the comment to create a multiline comment.
/*This is the example to show the multiline comment system in PHP. The example
does not display the comment in the output.*/
echo "Welcome to Tutorialdeep.";
/*echo "This is the way of implementing multline comment";
echo "How are you today."; This is the comment */
You must also read.