Vidyalelo
PHP · Q84

Operators And Expressions

Programming · PHP · question 84

Q84

What will be the output of the following PHP code ?

A.
testthisthisalso
B.
testthis
C.
testthisalsothisalso
Answer
D.
error at line 4

Answer: Option C

Solution

Answer: Option C
Solution:
The x .= y is a shorthand for x = x.y and this is evaluated from right to left.