Discussion :: PHP - CS
-
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";
}
}
a("Sherlock");
b();
?>
A.
I am here to spoil this code |
B.
Error |
C.
my favourite TV show is SherlockI am here ro spoil this code |
D.
None of the mentioned |
Answer : Option C
Explanation :
b is declared as TV() is executed first.
Be The First To Comment