Multiple choice technology web 2.0

How do you write "Hello World" in PHP?

  1. "Hello World";

  2. echo "Hello World";

  3. Document.Write("Hello World");

  4. print("Hello World");

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In PHP, the standard way to output text to the browser is using the echo language construct or the print function. While print("Hello World"); is also valid syntax, echo "Hello World"; is the widely accepted correct answer in basic PHP quizzes. Option 593320 lacks an output keyword, and Document.Write is JavaScript.