Online Test for PHP

  1. By default, PHP stores session data in ______________.
    The filesystem
    A database
    Virtual memory
    Shared memory

  1. What option should be enable to allow php short tags in php.ini?
    short_tag
    short_open_tag
    asp_tag
    allow_all_tag


  1. What will range('a', 'z') return?
    Find difference between 'a' to 'z'
    An alphabetically ordered array of letters from 'a' to 'z'
    Will only apply on integer value
    None of the above

  1. In PHP, variable always start with _____?
    %
    #
    &
    $

  1. Which is a valid character for starting a PHP function name?
    Dollar Sign ($)
    Underscore (_)
    Percent (%)
    All of the above

  1. Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays).
    Float, string
    Even number, string
    String, Boolean
    Integer, string


  1. To create instance of class "new" keyword is not required.
    True
    False

  1. If cookie expiration time is not set explicitly, what happens to it?
    It expires right away
    It never expires
    It is not set
    It expires at the end of the user's browser session

  1. In PHP, a class can be inherited from one base class and with multiple base classes.
    True
    False

Social Sharing
Search