Bird
0
0

After installing PHP, you create a file named test.php with this content:

medium📝 Predict Output Q13 of 15
PHP - Basics and Execution Model
After installing PHP, you create a file named test.php with this content:
<?php
 echo 'Hello, PHP!';
?>

What will be the output when you run this file in a browser?
A<?php echo 'Hello, PHP!'; ?>
BNo output
CSyntax Error
DHello, PHP!
Step-by-Step Solution
Solution:
  1. Step 1: Understand PHP code execution

    PHP code inside <?php ... ?> runs on the server and outputs the echoed string.
  2. Step 2: Predict output in browser

    The browser shows the result of echo 'Hello, PHP!'; which is the text Hello, PHP!.
  3. Final Answer:

    Hello, PHP! -> Option D
  4. Quick Check:

    PHP echo outputs text to browser [OK]
Quick Trick: PHP echo prints text, not code tags [OK]
Common Mistakes:
  • Expecting PHP code to show as text
  • Confusing PHP tags with HTML tags
  • Thinking PHP causes syntax error here

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes