3 Things You Should Know to Add Comments in PHP - Coding Cyber

3 Things You Should Know to Add Comments in PHP

In this step, we will learn about the comments. We are already using comments in the above steps. There are 2 types of comments in PHP.

They are Single Line Comments & Multi-Line Comments. And single line comments we can write them in 2 ways with 2 forward slashes and with a pound symbol #.

You can start the multi-lined comments, multiple times. But you can end multi-lined comments only once, you should remember this while using multi-line comments.

You should use the comments while writing the code, these comments will become useful when your code becomes complex or when you invite other people to work on the same project or if you are giving away the code to others for free or paid, they will easily understand the code with the help of the comments and they can easily modify the code based on their requirement.

Don’t write long paragraphs for comments, use simple hints with few sentences or words to remember the logic why you are doing that step.

Related Posts
No related posts for this content
Vivek Vengala
 

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: