Vidyalelo
PHP · Q2

Operators And Expressions

Programming · PHP · question 2

Q2

What will be the output of the following PHP code ?

A.
Error
Answer
B.
Hello World
C.
Nothing
D.
Missing semicolon error

Answer: Option A

Solution

Answer: Option A
Solution:
The statement should be print_r(‘Hello World’) to print Hello world. Also if there is only one line then there is no requirement of a semicolon, but it is better to use it.