1. Question: What will be the output of the following code?

    Function fn(&$var)

    {

                   $var=$var-($var/10*5);

                   Return $var;

    }

    Echo fn(100);

    A
    100

    B
    50

    C
    98

    D
    Eror Message

    E
    None

    Note: Not available
    1. Report
  2. Question: The inbuilt function to get the number of parameters passed is:

    A
    Arg_num()

    B
    Func_args_count()

    C
    Func_num_args()

    D
    ALL

    E
    None

    Note: Not available
    1. Report
  3. Question: Consider the following two statements:                                                    

    I.           While (expr) statement
    II.           
    While (expr): statement … endwhile;

    Which of the following are true in context of the given statements?

    A
    I is correct and II is wrong

    B
    I is wrong and II is correct

    C
    Both I & II are wrong

    D
    Both I & II are correct

    E
    None

    Note: Not available
    1. Report
  4. Question: We have two variable definitions:

    A.     023

    B.     X23

    Choose the correct options:

    A
    A is octal

    B
    B is hexadecimal

    C
    B is octal

    D
    A is hexadecimal

    E
    All

    Note: Not available
    1. Report
  5. Question: What will be the output of the following code?

    $var=10;

    Function Fn()

    {

                   $var=20;

    Return $var;

    }

    Fn();

    Echo $var;

    A
    10

    B
    20

    C
    Undefined Variable

    D
    Syntax Error

    Note: Not available
    1. Report
  6. Question: You have defined three variables $to, $subject, and $body to send an email. Which of the following methods would you use for sending an email?

    A
    Mail($to,$subject,$body)

    B
    Sendmail($to,$subject,$body)

    C
    Mail(to,subject,body)

    D
    Sendmail(to,subject,body)

    Note: Not available
    1. Report
  7. Question: Which of the following statements is correct with regard to interfaces?

    A
    A class can implement multiple interfaces

    B
    An abstract class cannot implement multiple interfaces

    C
    An interface can extend multiple interfaces

    D
    Methods with same name, arguments, sequence can exist in the different interfaces implemented by a class

    Note: Not available
    1. Report
  8. Question: How would you store order number (34) in an ‘OrderCookie’?

    A
    Setcookie(“OrderCookie”,34);

    B
    Make Cookie(“OrderCookie”,34);

    C
    Cookie(“OrderCookie”,34);

    D
    OrderCookie(34);

    Note: Not available
    1. Report
  9. Question: The setrawcookie() method of setting cookies is different from PHP standard method of cookie setting as:

    A
    It does not allow expiry time to be set

    B
    It can be used only once

    C
    It does not URL-ENCODE the value on its own

    D
    It does not allow domain setting

    Note: Not available
    1. Report
  10. Question: You need to keep an eye on the existing number of objects of a given class without introducing a non-class varibale. which of the following makes this happen?

    A
    Add a member varibale that gets incremented in the default constructer and decremented the destructer.

    B
    Add a local variable that gets incremented in each constructer and decremented in the desructer

    C
    Add a static member variable that gets incremented in each constructer and decreented in the destructor

    D
    This cannot be accomplished since the creation of objects is being done dynamically via “new”

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd