How to give comment in PHP

Give a Comment in PHP.
  • A comment in PHP code is a line that is not executed as a part of the program. That is used to read-only content.
  • In PHP mainly three types to comment PHP content.
    • single-line comments
    • <!DOCTYPE html>
      <html>
      <body>
      
      <?php
      echo "Hello World! ";
      // This is a single-line comment
      
      # This is a single-line comment
      ?>
      
      </body>
      </html>
      
    • multiple-line comments for Mac


    • Output:

      Note: Nothing in output
    • leave out parts of the code
    • <!DOCTYPE html>
      <html>
      <body>
      
      <?php
      // You can also use comments to leave out parts of a code line
      $a = 10 /* + 15 */ + 5;
      echo $a;
      ?>
      
      </body>
      </html>