ExamVeda
Login
Home
This question belongs to PHP Functions
Functions
?

What will be the output of the following PHP code ?
<?php
function TV($string)
{
  echo "my favourite TV show is ".$string;
  function b()
  {
      echo " I am here to spoil this code";
  }
}
function b()
{
  echo " I am here to spoil this code";
}
b();
TV("Sherlock");
?>

Answer & Solution
Correct Answer: Option B
Function b is declared twice.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.