PHP Multiple Choice Questions

  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

  1. If property of class is declare using var then PHP5 will treat the property as?
    1. Protected
    2. Private
    3. Public
    4. Final
Answer :
C
Explanation:
Added By : Rahul

Social Sharing
Search