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

What will be the output of the following PHP code?
<?php
$total = "25 students";
$more = 10;
$total = $total + $more;
echo "$total";
?>

Answer & Solution
Correct Answer: Option C
The integer value at the beginning of the original $total string is used in the calculation. However if it begins with anything but a numerical value, the value will be 0.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.