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();
?>

Answer & Solution
Correct Answer: Option A
This one works because b is declared independent of TV() also.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.