Online Test for PHP

  1. How are session variables accessed through?
    $_GET
    $_POST
    $_REQUEST
    None of the above

  1. How does the identity operator === compare two values?
    It converts both to a common compatible data type and then compares the values
    It returns True only if they are both of the same type and value
    It converts both values to strings and compares them
    If the two values are strings, it performs a syntax comparison


  1. If parent class has Final method abc(). Method abc() can be overridden in child class.
    True
    False

  1. A PHP scripting block always starts with
    < ?php ...... ?>
    <@ ....... />
    <% .... %>
    { ..... }

  1. If class implementing the interface does not use exact same method signatures as are defined in the interface. Will show
    No Error
    Fatal Error
    Warning Error
    Notice Error

  1. $this is a reference to the calling object
    True
    False


  1. Static properties cannot be initialized using
    expressions
    literal
    constant
    All of the above

  1. microtime() returns _______.
    current Unix timestamp with seconds
    current Unix timestamp with nanoseconds
    current Unix timestamp with microseconds
    None of the above

  1. What function creates a cookie?
    create_cookie()
    set_cookie()
    setcookie()
    None of the above

  1. PEAR stands for?
    PHP Extension and Application Record
    PHP Extended and Application Repository
    PHP Extension and Application Repository
    PHP Extension and Applicable Repository

Post Your Question
Social Sharing
Search