?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$x = "test";
$y = "this";
$z = "also";
$x .= $y .= $z ;
echo $x;
echo $y;
?>
<?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.
Join the Discussion
Login to post a comment or share your explanation.
Login