1. Question: Which is ideal statement  when we want to output a blend of static text and dynamic information stored within one or several variables?

    A
    Print()

    B
    printf()

    C
    echo()

    D
    None

    Note: Not available
    1. Report
  2. Question: printf("Bar inventory:%d bottles of tonic water.",100); What will its output?

    A
    Bar inventory:100 bottles of tonic water.

    B
    Bar inventory:100.00 bottles of tonic water.

    C
    Bar inventory: bottles of tonic water 100.

    D
    None

    Note: Not available
    1. Report
  3. Question: What’s the special meaning of the following metacharacter($:)?

    A
    Matches the beginning of the line

    B
    Matches the end of the line

    C
    Matches the middle of the line

    D
    It’s just used before a variable

    Note: Not available
    1. Report
  4. Question: Why preg_grep() function wiil you use?

    A
    Searches all elements of an array

    B
    For grapping the array

    C
    For grapping the character

    D
    Searches define elements of an array

    Note: Not available
    1. Report
  5. Question: select the correct output of the following’s syntax? <?php $v=array("public","policy","support","Republic"); $p=preg_grep("/^p/",$v); print_r($p); ?>

    A
    Array ( [0] => public [1] => policy )

    B
    [0] => public [1] => policy

    C
    Array ( [2] => support [3] => Republic )

    D
    [2] => support [3] => Republic

    Note: Not available
    1. Report
  6. Question: Which one matches any string enclosed within <b> and</b>?

    A
    <b>(.*)</b>

    B
    <b>(*)</b>

    C
    ^b(.*)</b>

    D
    ^b(.*)b

    Note: Not available
    1. Report
  7. Question: Select the correct output__ <?php $string1 = "10"; $string2 = "15"; $result = strcmp($string1, $string2); if ($result !== 0) {     echo "The strings do not match"; } else {     echo "The strings match"; } ?>

    A
    The strings do not match

    B
    The strings match

    C
    Both incorrect

    D
    Error

    Note: Not available
    1. Report
  8. Question: Which of the following function returns the number of characters in a string variable?

    A
    count($variable)

    B
    len($variable)

    C
    strcount($variable)

    D
    strlen($variable)

    Note: Not available
    1. Report
  9. Question: Which of the following variables is not a predefined variable?

    A
    $get

    B
    $request

    C
    $post

    D
    $ask

    Note: Not available
    1. Report
  10. Question: To know your browser and operating system’s information what will you consider?

    A
    <?php printf("Your browser is:",$_SERVER['HTTP_USER_AGENT']); ?>

    B
    <?php printf("Your browser is:",$_SERVER['HTTP_USER']); ?>

    C
    <?php printf("Your browser is:",$_SERVER['HTTP_ADDR_AGENT']); ?>

    D
    <?php printf("Your browser is:",$_POST['HTTP_USER_AGENT']); ?>

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