Home

What is the correct answer?

4

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

A. redgreen

B. red green

C. 0

D. error

Correct Answer :

C. 0


+ operator does not join both the strings.

Related Questions

If session.use_cookie is set to 0, this results in use of.. What will be the output of the following PHP code? <?php $a = array(a=>red,… What will be the output of the following PHP code? <?php $a1 = array_fill(3,… What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii)… Which of the following must be installed on your computer so as to run… What is the default number of seconds that cached session pages are made… What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT,… What will be the output of the following PHP code? <?php $age = array(Peter=>35,… What will be the output of the following PHP code ? <?php $color1 =… If the format is F then which one of the following will be returned? What will be the output of the following PHP code ? <?php $color =… Say you want to calculate the date 45 days from the present date which… PHP files have a default file extension of.. What will be the output of the following PHP code? <?php $a1 = array(red,… Which function displays the web pages most recent modification date? What will be the output of the following PHP code ? <?php class myObject… Which one of the following format parameter can be used to identify timezone? To create an object and set the date to JUNE 22, 2013, which one of the… What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME}… Which of the following PHP statements will output Hello World on the screen?i)… What will be the output of the following PHP code? <?php $cars = array(Volvo,… What will be the output of the following PHP code ? <?php $color1 =… What will be the output of the following PHP code ? <?php $i = ;while… What will be the output of the following PHP code ? <?php $i = 5;while… What will be the output of the following code? If say date is 22/06/2013.… What will be the output of the following PHP code? <?php $cars = array(Volvo,… What will be the output of the following PHP code ? <?php $color1 =… What will be the output of the following PHP code ? <?php define(GREETING,… What will be the output of the following PHP code ? <?php $i = 5;while… What will be the output of the following PHP code ? <?php $color1 =…