ExamVeda
Login
Home
This question belongs to PHP Functions
Functions
?

What will be the output of the following PHP code?
<?php
function sayHello()
{
   echo "HelloWorld<br />";
}
$function_holder = "sayHello";
$function_holder();
?>

Answer & Solution
Correct Answer: Option D
It is possible to assign function names as strings to variables and then treat these variables exactly as you would the function name itself.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.