ExamVeda
Login
Home
This question belongs to PHP Basic PHP
Basic PHP
?

What will be the output of the following php code?
<?php
$num  = "1";
$num1 = "2";
print $num+$num1;
?>

Answer & Solution
Correct Answer: Option A
The numbers inside the double quotes are considered as integers and not string, therefore the value 3 is printed and not 1+2.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.