PHP Comments
In PHP, comments are used to explain the code or to make it more understandable to other developers. They can also be used to temporarily disable a piece of code without having to delete it. PHP supports two types of comments:
- Single-line comments: They begin with two forward slashes “//” and end at the end of the line. For example:
// This is a single-line comment in PHP
- Multi-line comments: They begin with “/” and end with “/”. They can span multiple lines. For example:
/* This is a multi-line comment in PHP that can span multiple lines */ It’s good practice to include comments in your code to make it more readable and maintainable. However, you should avoid over-commenting, as it can make the code harder to read.
Apply for PHP Certification!
https://www.vskills.in/certification/certified-php-developer