11.
What will be the output of the following PHP code ?
<?php
$color = "red";
$color = "green";
echo "$color";
?>

12.
What will be the output of the following PHP code ?
<?php
$color1 = "red";
$color2 = "green";
echo "$color1" . "$color2";
?>

13.
What will be the output of the following PHP code ?
<?php
$color1 = "red";
$color2 = "green";
echo "$color1" + "$color2";
?>

14.
What will be the output of the following PHP code ?
<?php
$color1 = "red";
$color2 = "red";
echo "$color1" + "$color2";
?>

15.
What will be the output of the following PHP code ?
<?php
$color1 = "red";
$color2 = "1";
echo "$color1" + "$color2";
?>

16.
What will be the output of the following PHP code ?
<?php
$color1 = "1";
$color2 = "1";
echo "$color1" + "$color2";
?>

17.
What will be the output of the following PHP code ?
<?php
$color1 = "red";
$color2 = "1";
$color3 = "grey"
echo "$color1" + "$color2" . "$color3";
?>

18.
What will be the output of the following PHP code ?
<?php
echo "This", "was", "a", "bad", "idea";
?>

19.
What will be the output of the following PHP code ?
<?php
echo "This"."was"."a"."bad"."idea";
?>

20.
What will be the output of the following PHP code ?
<?php
echo "This","was"|"a","bad"."idea";
?>

Read More Section(Operators and Expressions in php)

Each Section contains maximum 100 MCQs question on Operators and Expressions in php. To get more questions visit other sections.