Which of the following is/are true for an abstract class?
i) Abstract classes in PHP are declared with the help of abstract keyword.
ii) A class is declare abstract by using the keyword implements.
iii) It is a class that really isn’t supposed to ever be instantiated but instead serves as a base class.
iv) Attempting to instantiate an abstract class results in an error.
a) Only i)
b) Only iii)
c) ii) and iv)
d) ii), iii) and iv)
Answer: a
Explanation: The abstract classes are the classes in which at least one method need to be abstract. Abstract classes in PHP are declared with the help of abstract keyword.
Related Posts
Which one of the following function returns the port number of a specified service?
What is the default port number of HTTPs?
Which one of the following function is used to retrieve the MX records for the domain specified by hostname?
Which one of the following function is used to return an array consisting of various DNS resource records pertinent to a specific domain?
Which one of the following function checks for the existence of DNS records?
What is the full form of DNS?
Which function is used to determine whether a file was uploaded?
Join The Discussion