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
Loading...
Related Quiz
- In PHP, a number with a decimal point or an exponential form is considered a float.
- What are the potential issues with a do...while loop in PHP?
- You have a PHP script and you need to access the session variables. How would you do this?
- You have a PHP script and you need to decode a JSON object into a PHP array. How would you do this?
- What are some common practices in PHP data filtering and validation?