Which of the following PHP statements will output Hello World on the screen?
1. echo (“Hello World”);
2. print (“Hello World”);
3. printf (“Hello World”);
4. sprintf (“Hello World”);

Which of the following PHP statements will output Hello World on the screen?
1. echo (“Hello World”);
2. print (“Hello World”);
3. printf (“Hello World”);
4. sprintf (“Hello World”); Correct Answer 1, 2 and 3

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.

Related Questions

What will be the output of the following PHP code?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
What will be the output of the following PHP code?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?