Question
What will be the output of the following php code?
< ?php
$num = "1";
$num1 = "2";
print $num+$num1 ;
?>
< ?php
$num = "1";
$num1 = "2";
print $num+$num1 ;
?>
Answer: Option A
Was this answer helpful ?
The numbers inside the double quotes are considered as integers and not string, therefore the value 3 is printed and not 1+2.
Was this answer helpful ?
More Questions on This Topic :
Question 8. PHP files have a default file extension of. ....
Question 10. Who is the father of PHP? ....
Submit Solution