Online Test for PHP

  1. What function split an array into chunks?
    array_chunk()
    array_split()
    array_split_chunk
    array_chunks()

  1. Which is correct syntax to declare constant?
    define("CONSTANT", "Placement Question");
    const CONSTANT = 'Placement Question';
    constant CONSTANT = 'Placement Question';
    A & B


  1. Parent constructors are not called implicitly if the child class defines a constructor.
    True
    False

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

  1. In terms of keywords and language syntax, PHP is similar to?
    C
    COBOL
    FORTRAN
    .Net


  1. PHP is an open source software
    True
    False

  1. The break statement ends execution of which of the following?
    while
    for
    switch
    All of the above

  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, a class can be inherited from one base class and with multiple base classes.
    True
    False

Post Your Question
Social Sharing
Search