PHP Multiple Choice Questions

  1. Calling a non-static method statically generates _____ .
    1. an E_STRICT level warning
    2. an E_DEPRECATED level warning
    3. an E_RECOVERABLE_ERROR level warning
    4. no warning
Answer :
A
Explanation:

Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code.

Added By : Jeevan


  1. Which of those is not magic method?
    1. __autoload
    2. __clone
    3. __sleep
    4. __toint
Answer :
D
Explanation:
Added By : Raja K

  1. What function creates a cookie?
    1. create_cookie()
    2. set_cookie()
    3. setcookie()
    4. None of the above
Answer :
C
Explanation:
Added By : Raja K


  1. What function split an array into chunks?
    1. array_chunk()
    2. array_split()
    3. array_split_chunk
    4. array_chunks()
Answer :
A
Explanation:
Added By : Raja K

  1. What is input sanitization?
    1. Secure user input
    2. Converting input into a format that PHP supports
    3. Removing or cleaning potentially malicious user input.
    4. All of the above
Answer :
C
Explanation:
Added By : Arnaaz

  1. If class implementing the interface does not use exact same method signatures as are defined in the interface. Will show
    1. No Error
    2. Fatal Error
    3. Warning Error
    4. Notice Error
Answer :
B
Explanation:
Added By : Varun


  1. Static properties cannot be initialized using
    1. expressions
    2. literal
    3. constant
    4. All of the above
Answer :
A
Explanation:
Added By : Pranav

  1. Which keyword cannot be used while defining property?
    1. Public
    2. Static
    3. Final
    4. Private
Answer :
C
Explanation:
Added By : Pranav

Post Your Question
Social Sharing
Search