Q.1
What will be the output of the following PHP code?

<?php
    function a()
    {
        function b()
        {
            echo 'I am b';
        }
        echo 'I am a';
    }
    b();
    a();
?>
Q.2
What will be the output of the following PHP code?
<?php
$str = "Hello World"
echo wordwrap($str,5,"n");    
?>
Q.3
What will be the output of the following PHP code?
<?php
echo ucwords("i love my country");
?>
Q.4
Which of the following PHP functions can be used to get the current memory usage?
Q.5
Which of the following PHP functions can be used for generating unique id’s?
Q.6
What will be the output of the following PHP code?

<?php
$op2 = "blabla";
function foo($op1)
{
        echo $op1;
        echo $op2;
}
foo("hello");
?>
Q.7
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();
?>
Q.8
What will be the output of the following PHP code?
<?php
function a()  
{
    function b()
    {
       echo 'I am b';
    }
    echo 'I am a';
}
b();
a();
?>
Q.9
What will be the output of the following PHP code?
<?php
$op2 = "blabla";
function foo($op1)
    {
        echo $op1;
        echo $op2;
    }
foo("hello");
?>
Q.10
What will be the output of the following PHP code ?
<?php
function string()
{
    echo strstr("Hello world!", 111);
}
string();
?>
Q.11
 . . . . . converts the keys of an array into values and the values into keys.
Q.12
A function in PHP which starts with ______ (double underscore) is know as.
Q.13
What will be the output of the following PHP code?
<?php
function foo($msg)
{
    echo "$msg";
}
$var1 = "foo";
$var1("will this work");
?>
Q.14
Which one of the following is the right way of defining a function in PHP?
Q.15
Type Hinting was introduced in which version of PHP?
Q.16
Above usleep() function pauses PHP for .
usleep(1000000);
Q.17
Output will be:
$array = array(0, 1, 2);
$array = array_pad($array, -6, ‘NEW’);
Q.18
What will happen in this function call?
<?php
function calc($price, $tax)	
{
    $total = $price + $tax;
}
$pricetag = 15;
$taxtag = 3;
calc($pricetag, $taxtag);	
?>
Q.19
What will be the output of the following PHP code?
<?php
function calc($price, $tax="")
{
    $total = $price + ($price * $tax);
    echo "$total"; 
}
calc(42);	
?>
Q.20
Which of the following are valid function names? 1. function() 2. €() 3. .function() 4. $function()
0 h : 0 m : 1 s