Q.1
What will be the output of the following PHP code?
<?php
function do($myString)
{
    echo strpos($myString, "donkey",0);
}
do("The donkey looks like a horse.");
?>
Q.2
What will be the output of the following PHP code?
<?php
function b()
{
    echo "b is executed";
}
function a()
{
    b();
    echo "a is executed";
    b();
}
a();
?>
Q.3
What will be the output of the following PHP code?
<?php
function addFunction($num1, $num2)
{
    $sum = $num1 + $num2;
    return $sum;
}
$return_value = addFunction(10, 20);
echo "Returned value from the function : $return_value"
?>
Q.4
What will be the output of the following PHP code?
<?php
   echo "chr(52)";
?>
Q.5
What will be the output of the following PHP code?
<?php
function onespan>()
{
    define("const","I am awesome!");
    echo constant("const");
}
one();
?>
Q.6
What will be the output of the following PHP code?
<?php
    $title = "O'malley wins the heavyweight championship!";
    echo ucwords($title);
?>
Q.7
What will be the output of the following PHP code?
<?php
function sayHello()
{
   echo "HelloWorld<br />";
}
$function_holder = "sayHello";
$function_holder();
?>
Q.8
What will be the output of the following PHP code?
<?php
    echo ord ("hi");
?>
Q.9
What will be the output of the following PHP code?
<?php
   echo(atan(0.50));
?>
Q.10
What will be the output of the following PHP code?
<?php
   define("GREETING","Hello you! How are you today?");
   echo constant("GREETING");
?>
Q.11
What will be the output of the following PHP code?
<?php
    echo str_pad("Salad", 5)." is good.";
?>
Q.12
What will be the output of the following PHP code?
<?php
function calc($price, $tax="")
 {
    $total = $price + ($price * $tax);
    echo "$total"; 
 }
calc(42);    
?>
Q.13
What will be the output of the following PHP code?
<?php
    echo "chr(52)";
?>
Q.14
What will be the output of the following PHP code?
<?php
    echo ord ("hi");
?>
Q.15
What will be the output of the following PHP code?
<?php
function foo($msg)
{
    echo "$msg";
}
$var1 = "foo";
$var1("will this work");
?>
Q.16
What will be the output of the following PHP code?
<?php
echo lcfirst("welcome to India");
?>
Q.17
Which one of the following PHP functions can be used to build a function that accepts any number of arguments?
Q.18
Which one of the following PHP functions can be used to find files?
Q.19
What will be the output of the following PHP code?
<?php
define("GREETING1","Hello you! How are you today?");
define("GREETING2","Hello you! How are you today?");
define("GREETING3","Hello you! How are you today?");
echo defined("GREETING");
?>
Q.20
What will be the output of the following PHP code?
<?php
    function a()
    {
        function b()
        {
            echo 'I am b';
        }
        echo 'I am a';
    }
    a();
    a();
?>
0 h : 0 m : 1 s