What will be the output of the following PHP 7.1 code snippet?
var $example = var $array = array('My name is A.', 'My name is B.', 'My name is C.');
var $r = 'My name is r.';
}
$f = new f();
$example = 'example';
$b = array('f', 'example', 'b', 'c');
echo $f->$example. "\n";
echo $f->{$b[1]} . "\n";
$start = 'exa';
$end = 'mple';
echo $f->{$start. $end}. "\n";
$array = 'array';
echo $f->{$array[1]}. "\n";
?>
Correct Answer:
My name is example.
My name is example.
My name is example.
My name is r.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PHP 5 MCQ Questions