ExamVeda
Login
Home
This question belongs to PHP Basic PHP
Basic PHP
?

What will be the output of the following code?
<?php 
$foo = 'Bob';
$bar = &$foo;        
$bar = "My name is $bar";
echo $bar;
echo $foo;
?>

Answer & Solution
Correct Answer: Option C
The $bar = &$foo; line will reference $foo via $bar.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.