ExamVeda
Login
Home
Operators and Expressions in php
?

What will be the output of the following PHP code ?
<?php
$x = "test";
$y = "this";
$z = "also"; 
$x .= $y .= $z ;
echo $x;
echo $y;
?>

Answer & Solution
Correct Answer: Option C
The x .= y is a shorthand for x = x.y and this is evaluated from right to left.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.