Home

What will be the output of the following code?



<?php
$foo = 'Bob';
$bar = &$foo;
$bar = "My name is $bar";
echo $bar;
echo $foo;
?>

A.

Error


B.

My name is BobBob


C.

My name is BobMy name is Bob


D.

My name is Bob Bob


0) print $i;} ?> ">What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  • What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  • Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii) Adobe Dreamweaveriv) PDT
  • What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  • What will be the output of the following PHP code ? <?php $color = red;echo $color . red ;?>
  • What will be the output of the following PHP code ? <?php class myObject { }define('myObject::CONSTANT',…
  • To create an object and set the date to JUNE 22, 2013, which one of the following statement should be…
  • What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii) Pretext Hypertext Processoriv)…
  • What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT, I have a…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = 1;$color3 = greyecho…
  • What will be the output of the following PHP code ? <?php $i = 0;while ((--$i > ++$i) - 1){ print…
  • If session.use_cookie is set to 0, this results in use of..
  • Which one of the following is the default PHP session name?
  • What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while (--$i > 0) print…
  • What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME} = value;echo…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  • What will be the output of the following PHP code? <?php $a = array(red, green, blue);array_pop($a);print_r($a);?>…
  • A PHP script should start with ___ and end with ___:
  • What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  • What will be the output of the following PHP code ? <?php $color1 = 1;$color2 = 1;echo $color1 +…
  • -->

    Please do not use chat terms. Example: avoid using "grt" instead of "great".