1. Question: Given the string: $var = "john@php.net"; Which of the following will extract the TLD (top level domain) of ".net" from the string?

    A
    strstr($var, strpos($var, "."));

    B
    substr($var, strpos($var, "@"));

    C
    substr($var, strstr($var, "."));

    D
    substr($var, strpos($var, ".") + 1);

    E
    substr($var, strpos($var, "."));

    Note: Not available
    1. Report
  2. Question: When comparing two strings, which of the following is acceptable?

    A
    $a === $b;

    B
    strcasecmp($a, $b);

    C
    strcmp($a, $b);

    D
    $a == $b;

    E
    str_compare($a,$b);

    Note: Not available
    1. Report
  3. Question: A fingerprint of a string can be determined using which of the following?

    A
    md5()

    B

    C

    D

    E
    biomatrix()

    Note: Not available
    1. Report
  4. Question: Which of the following is the best way to split a string on the "-=-" pattern?

    A

    B

    C
    preg_split("-=-", $string);

    D
    explode("-=-" $string);

    E
    None

    Note: Not available
    1. Report
  5. Question: What is the output of the following code?
    <?php
    
       $string = "14302";
       
       $string[$string[2]] = "4";
       
       print $string;
       
    ?>

    A
    14304

    B
    14342

    C
    44302

    D
    14402

    E
    Array

    Note: Not available
    1. Report
  6. Question: Which of the following comparisons will evaluate to true?

    A
    't' == t

    B
    1 === "1time"

    C
    "top" == 0

    D
    "top" === 0

    E

    Note: Not available
    1. Report
  7. Question: Which function is best suited for removing markup tags from a string?

    A
    strip_markup

    B
    strip_tags

    C
    str_replace

    D
    preg_replace

    E

    Note: Not available
    1. Report
  8. Question: What is the output for the following code?
    <?php
       
     $total=0;
       for($i=0;$i<4;$i++){
    
          $total=$total+$i;
       }
    echo $total;
    ?>

    A
    6

    B
    7

    C
    8

    Note: Not available
    1. Report
  9. Question: What is the output for the following code?
    <?php
      $total=0;
      for($i=0;$i<4;$i++){
         
       $total=$total+$i;
    
      }
      echo $total;
    
    ?>

    A
    6

    B
    4

    C
    5

    Note: Not available
    1. Report
  10. Question: What is the output for the following code?
    <?php
      $total=0;
      for($i=0;$i<4;$i++){
         
       $total=$total+$i;
    
      }
      echo $total;
    
    ?>

    A
    6

    B
    7

    C
    8

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