-
What will be the output of the following PHP code ?
<?php
$str1 = "Hello ";
$str2 = "Interview ";
$str3 = "Mania ";
$str1 .= $str2 .= $str3 ;
echo $str1;
echo $str2;
?>
-
- Hello Interview Mania
- Interview Mania
- Hello Interview Mania Interview Mania
- Interview Mania Interview Mania
- None of these
Correct Option: C
The str1 .= str2 is a shorthand for str1 = str1.str2 and this is evaluated from right to left.