?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
function foo($msg)
{
echo "$msg";
}
$var1 = "foo";
$var1("will this work");
?>
<?php
function foo($msg)
{
echo "$msg";
}
$var1 = "foo";
$var1("will this work");
?>
Answer & Solution
Correct Answer:
Option
D
It is possible to call a function using a variable which stores the function name.
Join the Discussion
Login to post a comment or share your explanation.
Login