Comments in PHP
Comments are written in between the codes to remember the purpose of that code.
Comments are not executed with the code. It is written solely for the reader to read and understand why the code was written.
As developers keep working different projects and later when they look back at their old code, it's hard to remember what idea the developer had while writing that peice of code. So to overcome this, we use comments.
Now coming to the types of comments in PHP
We have 2 types of comments :
1.Single line comment
Single line comments :
Single line comments can be written using the "//".
Single line comments can also be written using "#".
Multi-line comments :
In php, Multi-line comments can be written using "/*" and "*/"
Comments can also be written in between a line of code.
© Copyright - 2018 - 2023 | All rights reserved at Funda of Web IT