Bird
0
0

What marks the beginning of PHP code in a file?

easy📝 Conceptual Q11 of 15
PHP - Request Lifecycle
What marks the beginning of PHP code in a file?
AThe <code><php></code> tag
BThe <code><script></code> tag
CThe <code><?php</code> tag
DThe <code><?></code> tag
Step-by-Step Solution
Solution:
  1. Step 1: Identify PHP opening tag

    PHP code always starts with the <?php tag to tell the server to process PHP.
  2. Step 2: Compare with other tags

    Other tags like <script> are for JavaScript, and <php> is invalid.
  3. Final Answer:

    The <?php tag -> Option C
  4. Quick Check:

    PHP starts with <?php [OK]
Quick Trick: PHP code always starts with <?php tag [OK]
Common Mistakes:
  • Confusing PHP tags with HTML or JavaScript tags
  • Using short tags like
  • Thinking PHP starts with ? or other symbols

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes