CSE :: 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";
}
}
b();
?>
-
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();
?>
-
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");
?>
-
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();
?>
-
What will be the output of the following PHP code ?
<?php
function calc($num1, $num2)
{
$total = $num1 * $num2;
}
$result = calc(42, 0);
echo $result;
?>
-
What will be the output of the following PHP code ?
<?php
function calc($num1, $num2)
{
$total = $num1 * $num2;
return $total;
}
$result = calc(42, 0);
echo $result;
?>
-
What will be the output of the following PHP code ?
<?php
$var = 10;
function one()
{
echo $var;
}
one();
?>
-
What will be the output of the following PHP code ?
<?php
function mine($m)
{
if ($m < 0)
echo "less than 0";
if ($ >= 0)
echo "Not True";
}
mine(0);
?>
-
What will be the output of the following PHP code ?
<?php
$x = 75;
$y = 25;
function addition()
{
$GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];
}
addition();
echo $z;
?>
-
What will be the output of the following PHP code ?
<?php
function 2myfunc()
{
echo "Hello World";
}
2myfunc();
?>