1. Question: Which of the following are “magic constant”?

    A
    __LINE__

    B
    __FILE__

    C
    __PRETTY_FUNCTION__

    D
    __CLASS__

    E
    __METHOD__

    Note: Not available
    1. Report
  2. 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
  3. Question: Which one of the following is turnary operator?

    A
    &

    B
    =

    C
    ?:

    D
    +=

    Note: Not available
    1. Report
  4. Question: : What is the result of the following Exprssion? 5+2*4+6

    A
    70

    B
    19

    C
    34

    D
    21

    Note: Not available
    1. Report
  5. Question: default value of register global in PHP is:

    A
    off

    B
    on

    Note: Not available
    1. Report
  6. Question: What would b the outpur of the following code?
    $string = ‘good day’;
    $string = ucword($string);
    echo $string;
    ?>

    A
    good day

    B
    GOOD DAY

    C
    Good Day

    D
    non of the above

    Note: Not available
    1. Report
  7. Question: If you want to pass a value to a function by reference, the correct way is:

    A
    function ModifyReport(&$Rptfile){}

    B
    function ModifyReport($Rptfile){}

    C
    function ModifyReport(ByRef $Rptfile){}

    D
    function ModifyReport(&Rptfile){}

    Note: Not available
    1. Report
  8. Question: What would be the output of the following code? <?php $string = 'good day'; $string = ucwords($string); echo $string; ?>

    A
    good day

    B
    GOOD DAY

    C
    Good Day

    D
    None

    Note: Not available
    1. Report
  9. Question: You have a 2D array in PHP: $array = array(array(141,151,161), 2,3, array(101, 202, 303)); You want to display all the values in the array The correct way is:

    A
    function DisplayArray($array) { foreach ($array as $value) { if (array_valid($value)) { DisplayArray($value); } else { echo $value. “<br>”; } } } DisplayArray($array);

    B
    function DisplayArray($array) { for ($array as $value) { if (valid_array($value)) { DisplayArray($value); } else { echo $value. “<br>”; } } } DisplayArray($array);

    C
    function DisplayArray($array) { for ($array as $value) { if (is_array($value)) { DisplayArray($value); } else { echo $value."<br>"; } } } DisplayArray($array);

    D
    function DisplayArray($array) { foreach ($array as $value) { if (is_array($value)) { DisplayArray($value); } else { echo $value "<br>"; } } } DisplayArray($array);

    Note: Not available
    1. Report
  10. Question: What will be the output of the following PHP code <?php $Rent = 250; function Expenses($Other) { $Rent = 250 + $Other; return $Rent; } Expenses(50), echo $Rent; ?>

    A
    200

    B
    300

    C
    0

    D
    Program will not compile

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