Free download web templates, books and more. Free php projects ,games and apps. GTA mods and more

Breaking

php comments || how to use php comments

How To Use PHP Comments

php comments are used for user consider the page .thats not display browser.
PHP comments can be used to describe any line of code so that other developer can understand the code easily. It can also be used to hide any code.
PHP supports single line and multi line comments. These comments are similar to C/C++ and Perl style (Unix shell style) comments.

Two Types of php comments

  • single line comments
  • multi line comments

PHP Single Line Comments

There are two ways to use single line comments in PHP.
  • // (C++ style single line comment)
  • # (Unix Shell style single line comment)
  1. <?php  
  2. // this is C++ style single line comment  
  3. # this is Unix Shell style single line comment  
  4. echo "Welcome to PHP single line comments";  
  5. ?>  
Output:
Welcome to PHP single line comments

PHP Multi Line Comments


   php multi line comments declare
                                                   /* 
                                                      and you are
                                                  comments  */