"/>
Home / CSE MCQs / PHP MCQs :: Discussion

Discussion :: PHP MCQs

  1. What will be the output of the following code?
    < ?php  $foo = 'Bob';               $bar = &$foo;               $bar = "My name is $bar";   echo $bar; echo $foo; ?>
  2. A.
    Error
    B.
    My name is BobBob
    C.
    My name is BobMy name is Bob
    D.
    My name is Bob Bob

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The $bar = &$foo; line will reference $foo via $bar.


Be The First To Comment