PHP MCQ PHP Basic MCQ Question #2361
Single Choice Not Set

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

ID: #2361 PHP Basic MCQ 1,573 views
Question Info
#2361Q ID
Not SetDifficulty
PHP Basic MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Error
  • B 35 students
  • C 35
  • D 25 students
Correct Answer

Explanation

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.

Share This Question

Challenge a friend or share with your study group.