Bird
0
0

You have nested comments in your PHP code like this:

hard📝 Application Q9 of 15
PHP - Basics and Execution Model
You have nested comments in your PHP code like this:
<?php
/* Outer comment start
/* Inner comment */
Outer comment end */
?>

What will happen?
AInner comment ends outer comment early
BPHP supports nested comments; no error
CSyntax error due to nested /* */ comments
DOnly inner comment is ignored
Step-by-Step Solution
Solution:
  1. Step 1: Understand PHP comment nesting

    PHP does not support nested /* ... */ comments.
  2. Step 2: Effect of nested comments

    Nested /* inside another /* causes syntax error.
  3. Final Answer:

    Syntax error due to nested comments -> Option C
  4. Quick Check:

    Nested comments cause error = A [OK]
Quick Trick: PHP does not allow nested /* ... */ comments [OK]
Common Mistakes:
  • Assuming nested comments work
  • Ignoring syntax errors from nesting
  • Confusing with other languages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes