Q: What will be the output of the following PHP code?
Solution: If you need to output something onto the screen you’ll need to use echo or print_r.
Q: What will be the output of the following PHP code?
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.
Q: What will be the output of the following PHP code?
Solution: In PHP, all user-defined functions, classes, and keywords (e.g. if, else, while, echo, etc.) are case-insensitive.
Q: What will be the output of the following PHP code?
Solution: In PHP, all variables are case-sensitive.
Q: What will be the output of the following PHP code?
Solution: # is a single line comment.
Q: What will be the output of the following PHP code? Hello World" ?>
Solution: You can use tags like italics, bold etc. inside php script.
Q: What will be the output of the following PHP code?
Solution: It would have printed echo “Hello world” if we have put backslash doublequotes just before and just after Hello World string.
Q: What will be the output of the following PHP code? ?>
Solution: You can not have php tags inside a php tag.
Q: What will be the output of the following PHP code?
Solution: To print red remove the .
You Have Score    | /9 |