PHP Comments
Introduction :
- Like each and every programming language , PHP do support comments which is used to hide the unwanted code or for documentation purpose.
- PHP Comments makes development easy and provide great way to hide the un-wanted code.
- Like C Programming , PHP Supports two types of comments i.e Single Line Comment and Multiple Line Comment.
Live Example of Comment :
[box]In PHP, we use // to make a one-line comment or /* and */ to make a comment block[/box]
<html> <body> <?php //This is a Single Line comment PHP /* This is block comment in PHP */ ?> </body> </html>
Explanation :
- Comments in PHP can be Multiple Line or Single Line
- PHP Comments are used to hide the code or to prevent code from execution.
- PHP Comments can be used effectively by smart programmer for documentation.
- PHP Comments can be written at any place in the code.
External Article : What is Difference Between Block Comment and Single Line Comment.