Vidyalelo
PHP · Q35

Functions

Programming · PHP · question 35

Q35

What will be the output of the following PHP code? "; function_holder = "sayHello"; function_holder(); ?>

A.
No Output
B.
Error
C.
sayHello
D.
HelloWorld
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
It is possible to assign function names as strings to variables and then treat these variables exactly as you would the function name itself.