"> What will be the output of the following PHP code?<?phpfunction

Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code?
    <?php
    function fun($message)
    {
    echo "$message";
    }
    $var = "fun";
    $var("Executed...");
    ?>
    1. message
    2. Error
    3. Nothing
    4. Executed...
    5. None of these
Correct Option: D

It is possible to call a function using a variable which stores the function name.



Your comments will be displayed only after manual approval.