1. Question: print 'This string will $print exactly as it's \n declared.'; This produces the following:

    A
    This string will $print exactly as it's \n declared.

    B
    This string will $print exactly as it's declared.

    C
    This string will $print exactly as it's declared.

    D
    This string will $print exactly as it's \n declared.

    Note: Not available
    1. Report
  2. Question: Which function used to find and replaceĀ  pattern with a replacement string?

    A
    eregi_replace()

    B
    ereg()

    C
    replace_string()

    D
    peregI()

    Note: Not available
    1. Report
  3. Question: Polymorphism, a term originating from the _______ that means "having multiple forms,"

    A
    Greek language

    B
    British language

    C
    American language

    D
    Other language

    Note: Not available
    1. Report
  4. Question: How to divide a string into various elements?

    A
    using  string_divide()

    B
    Substring()

    C
    Split()

    D
    Str()

    Note: Not available
    1. Report
  5. Question: <?php
    $primes = array(2,3,5,7,11,13,17,19,23,29,31,37,41,43,47);
    for($count = 1; $count++; $count < 1000) {
      $randomNumber = rand(1,50);
    
      if (in_array($randomNumber,$primes)){
        break;
      }else {
        printf("Non-prime number found: %d", $randomNumber);
      }
    }
    ?>
    Sample output follows:

    A
    Non-prime number found: 48 Non-prime number found: 42 Prime number found: 17

    B
    Non-prime number found: 48 Non-prime number found: 42 Prime number found: 00

    C
    48 17

    D
    Non-prime number found Non-prime number found Prime number found

    Note: Not available
    1. Report
  6. Question: Which function searches all elements of an array, returning an array() ?

    A
    using  array_Search()

    B
    Search()

    C
    preg_grep()

    D
    Str()

    Note: Not available
    1. Report
  7. Question: What is the output for the following code?
    <?php
    $usernames = array("Grace","Doris","Gary","Nate","missing","Tom");
    for ($x=0; $x < count($usernames); $x++) {
    if ($usernames[$x] == "missing") continue;
    printf("Staff member: %s <br />", $usernames[$x]);
    }
    ?>

    A
    Staff member: Grace Staff member: Doris Staff member: Gary Staff member: Nate Staff member: Tom

    B
    Staff member: Gary Staff member: Nate Staff member: Tom Staff member: Grace Staff member: Doris

    C
    Grace Doris Gary Nate missing Tom

    D
    none

    Note: Not available
    1. Report
  8. Question: ___________  function searches a string for a specific pattern, returning TRUE if it exists.

    A
    preg_search()

    B
    preg_find()

    C
    preg_match()

    D
    preg_replace()

    Note: Not available
    1. Report
  9. Question: 
    function calculate($price, $price2="", $price3="")
    {
      echo $price + $price2 + $price3;
    }
    You can then call calculate(), passing along just $price and $price3, like so: calculate(10, "", 3); This returns the following value:

    A
    13

    B
    10, "", 3

    C
    10,00, 3

    D
    10null3

    Note: Not available
    1. Report
  10. Question: Spliting a string into various elements based on Case-Insensitive pattern_

    A
    preg_search()

    B
    preg_find()

    C
    reg_split()

    D
    preg_split()

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