1. Question: Which of the following is a Ternary Operator?

    A
    &

    B
    =

    C
    :?

    D
    ?:

    E
    +=

    F
    &&

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

    $a=10;

    If($a>5 OR <15)

      Echo “true”;

    Else

     Echo “false”

    A
    True

    B
    False

    C
    No output

    D
    Parse Error

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

    <?php

    Var_dump(3*4);

    ?>

    A
    Int(3*4)

    B
    Int(12)

    C
    3*4

    D
    12

    E
    None

    Note: Not available
    1. Report
  4. Question: Which of the following is a correct declaration?

    A
    Static $varb= array(1,’val’,3);

    B
    Static $varb= 1+(2*90);

    C
    Static $varb= sqrt(81);

    D
    Static $varb= new Object;

    E
    All

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

    $Rent=250;

    Function Expenses($Other)

    {

                   $Rent=250+$Other;

                   Return $Rent;

    }

    Expenses(50);

    Echo $Rent;

    A
    300

    B
    250

    C
    200

    D
    Program will not compile.

    Note: Not available
    1. Report
  6. Question: You need to count the number of parameters given in the URL by a POST operation. The correct way is:

    A
    Count($POST_VARS);

    B
    Count($POST_VARS_PARAM);

    C
    Count($_POST);

    D
    Count($HTTP_POST_PARAM);

    Note: Not available
    1. Report
  7. Question: Which of the following regular expressions can be used to check the validity of an e-mail address?

    A
    ^[^@ ]+@[^@ ]+\.[^@ ]+$

    B
    ^[^@ ]+@[^@ ]+.[^@ ]+$

    C
    $[^@ ]+@[^@]+\.[^@ ]+^

    D
    $[^@ ]+@[^@]+.[^@ ]+^

    Note: Not available
    1. Report
  8. Question: Which of the following attribute is needed for file upload via form?

    A
    Enctype=”multipart/form-data”

    B
    Enctype=”singlepart/data”

    C
    Enctype=”file”

    D
    Enctype=”form-data/file”

    Note: Not available
    1. Report
  9. Question: Which of the following type cast is not correct?

    <?php

    $fig=23;

    $varb1=(real) $fig;

    $varb2=(double) $fig;

    $varb3=(decimal) $fig;

    $varb4=(bool) $fig;

    ?>

    A
    Real

    B
    Double

    C
    Decimal

    D
    Boolean

    Note: Not available
    1. Report
  10. Question: Which of the following characters are taken care of by htmlspecialchars?

    A
    <

    B
    >

    C
    Single quote

    D
    Double quote

    E
    &

    F
    ALL

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