PHP Test online
6. What OOP construct unavailable in PHP does the following script approximate?Вариант ответа 1 - A) Multiple inheritance Вариант ответа 2 - B) Interfaces Вариант ответа 3 - C) Abstract methods Вариант ответа 4 - D) Private methods Вариант ответа 5 - E) Function overloading Comments: This tidbit of code approximates the behaviour usually provided by an abstract method. If this class is inherited by another class and the my_funct method is called without being overridden in the child class, the code will throw an error. Naturally, this is only an approximation of the way abstract methods work, but it’s the best that can be done using PHP limited object model. |
Comments
| User name | Comment |
|---|
Русский