Question
What will be the output of the following PHP code ? 1. A. Hello World B. Bye C. Hello worldBye D. Error 2. A. 3
What will be the output of the following PHP code ?
1.
$bye = "Bye";
print $hello;"$bye";
?>
A. Hello World
B. Bye C. Hello worldBye D. Error
2.
var $two = 2;
print "$one / $two * $one / $two * $two";
A. 1 B. 0 C. 0.5 D. Error
3.
$num1 = 2;
print $num . "+". $num1 ;
?>
A. 3 B. 1+2 C. 1.+.2 D. Error
4.
$num1 = "2";
print $num+$num1 ;
?>
A. 3 B. 1+2 C. Error D. 12
5.
Which of the following php statement/statements will store 111 in variable num?
i) int $num = 111;
ii) int mum = 111;
iii) $num = 111;
iv) 111 = $num;
A. Both (i) and (ii) B. All of the mentioned. C. Only (iii) D. Only (i)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started