Single Choice Not Set

QWhat will be the output of the following PHP code?
< ?php 
    function a()
    {
        function b()
        {
            echo 'I am b';
 	}
        echo 'I am a';
    }
    a();
    a();
?>

ID: #2432 Functions in PHP MCQ 705 views
Question Info
#2432Q ID
Not SetDifficulty
Functions in PHP MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A I am b
  • B I am bI am a
  • C Error
  • D I am a Error
Correct Answer

Explanation

This will be the output- I am a Fatal error: Cannot redeclare b()

Share This Question

Challenge a friend or share with your study group.