Bird
0
0

Which of the following correctly represents a multi-line comment in PHP?

easy📝 Syntax Q3 of 15
PHP - Basics and Execution Model
Which of the following correctly represents a multi-line comment in PHP?
A/* This is a multi-line comment */
B// This is a multi-line comment //
C# This is a multi-line comment #
D<!-- This is a multi-line comment -->
Step-by-Step Solution
Solution:
  1. Step 1: Identify multi-line comment syntax

    PHP uses /* and */ to start and end multi-line comments.
  2. Step 2: Check each option

    /* This is a multi-line comment */ uses /* ... */, which is correct. Options B and C are single-line comment styles. is HTML comment syntax, not PHP.
  3. Final Answer:

    /* This is a multi-line comment */ -> Option A
  4. Quick Check:

    Multi-line comments use /* ... */ [OK]
Quick Trick: Multi-line comments in PHP use /* and */ [OK]
Common Mistakes:
  • Using // or # for multi-line comments
  • Confusing HTML comments with PHP comments

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes