Vidyalelo
PHP · Q15

Basic PHP

Programming · PHP · question 15

Q15

What will be the output of the following PHP code?

A.
Error
B.
35 students
C.
35
Answer
D.
25 students

Answer: Option C

Solution

Answer: Option C
Solution:
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.