PHP Comments

There are three types of comments in PHP.
The first type of comment lets you create multiline comments, which start with /* and ends with */, the way.

  <?php
  /* begin by display a message explaining what we are doing to the user */
  echo "welcome to PHP.";
  ?>

if you have a substantial comment that will take multiple lines to display.

  <?php
  /* home
  /*page*/
  hi user*/
  echo "welcome to php.";
  ?>

Both of the other types of comments are one-line comments.

  <?php
  //display a welcoming message.
  echo "welcome to php";
  ?>
 <?php
 //display a welcoming message.
 #display a welcoming message.
 echo "welcome to PHP.";
 ?>