PHP MCQ PHP Basic MCQ Question #2358
Single Choice Not Set

QWhich of the following PHP statements will output Hello World on the screen?
(i) echo (“Hello World”);
(ii) print (“Hello World”);
(iii) printf (“Hello World”);
(iv) sprintf (“Hello World”);

ID: #2358 PHP Basic MCQ 2,958 views
Question Info
#2358Q ID
Not SetDifficulty
PHP Basic MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A (i) and (ii)
  • B (i), (ii) and (iii)
  • C All of the mentioned
  • D (i), (ii) and (iv)
Correct Answer

Explanation

echo(), print() and printf() all three can be used to output a statement onto the screen. The sprintf() statement is functionally identical to printf() except that the output is assigned to a string rather than rendered to the browser.

Share This Question

Challenge a friend or share with your study group.