Which of the following are valid ways to denote a comment in PHP?

  • /* Comment */
  • < !-- Comment -- >
  • // Comment
  • All of the above
In PHP, there are two types of comment syntax. The first type, //, is for single-line comments. The second type, /.../, is for multiple-line comments. HTML-style comments (< !--...-- >) are not recognized by PHP. So, both /* Comment */ and // Comment are valid ways to denote a comment in PHP. Learn more: https://www.php.net/manual/en/language.basic-syntax.comments.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *