Bird
0
0

What will this PHP code output?

medium📝 Predict Output Q13 of 15
PHP - Basics and Execution Model
What will this PHP code output?
<?php
 echo "Hello, World!";
?>
ASyntax Error
BHello, World!
C<?php echo "Hello, World!"; ?>
DNothing
Step-by-Step Solution
Solution:
  1. Step 1: Understand echo statement

    The echo command prints the text inside quotes to the browser.
  2. Step 2: Check code correctness

    The code is correct PHP syntax and will output the string exactly.
  3. Final Answer:

    Hello, World! -> Option B
  4. Quick Check:

    echo prints text = Hello, World! [OK]
Quick Trick: echo prints text inside quotes [OK]
Common Mistakes:
  • Expecting PHP code to show as text
  • Thinking code causes error without semicolon

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes