Q.1.
strlen() returns the length of the string on success and . . . . if the string is empty.
Q.2.
 . . . . returns a new DateTime object.
Q.3.
It is always necessary to use parentheses with the print function.
Q.4.
The below statement will return.
$Var = substr(""abcdef"", -4, 1);
Q.5.
Returning values from functions may include .....
Q.6.
The arguments in a function are evaluated from .....
Q.7.
Which one of the following functions can be used to compress a string?
Q.8.
What will be the output of the following PHP code ?
<?php
function time($string)
{
    echo strtr("Towe Pa55", "ow5", $string);
}
time("ims");
?>
Q.9.
What will be the output of the following PHP code ?
<?php
function test($int)
{
    if ($int == 1)
        echo "This Works";
    if ($int == 2)
        echo "This Too Seems To Work";
}
test(1);
TEST(2);
?>
Q.10.
What will be the output of the following PHP code ?
<?php
function mine($num)
{
    $num = 2 + $num;
    echo $num;
}
mine(3);
?>
Q.11.
What will be the output of the following PHP code ?
<?php
function constant()
{
    define("GREETING", "Welcome to Narnia");
    echo greeting;
}
?>
Q.12.
What will be the output of the following PHP code ?
<?php
function constant()
{
    define("GREETING", "Welcome to Narnia",true);
    echo greeting;
}
?>
Q.13.
What will be the output of the following PHP code ?
<?php
function start($string)
{
    if ($string < 45)
        return 20;
    else
        return 40;
}
$t = start(90);
if ($t < 20)
{
    echo "Have a good day!";
}
else
{
    echo "Have a good night!";
}
?>
Q.14.
What will be the output of the following PHP code ?
<?php
$var = 10;
function one()
{
    echo $var;
}
one();
?>
Q.15.
What will be the output of the following PHP code?
<?php 
    $str = addslashes('What does "yolo" mean?');
    echo($str); 
?>
Q.16.
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();
?>
Q.17.
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");
?>
Q.18.
What will be the output of the following PHP code ?
<?php
function mine($num)
{
    $num = 2 + $num;
    echo "$num";
}
mine(3);
?>
Q.19.
What will be the output of the following PHP code ?
<?php
function movie($int)
{
    $movies = array("Fight Club", "Kill Bill", "Pulp Fiction");
    echo "You Do Not Talk About ". $movie[$integer];
}
movie(0);
?>
Q.20.
What will be the output of the following PHP code ?
<?php
function email()
{
    $email =[email protected]’;
    $new = strstr($email, ‘@');
    echo $new;
}
email();
?>