How to Write Comment in PHP (Single and Multiline)

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.


How are you today?

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.


Welcome to Tutorialdeep.

You must also read.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.