php - How can an abstract class be executed if it cannot be instantiated -


i trying out oop programming in php , when instantiated class, generated error saying that class needs abstract.

when class need abstract? , how can abstract classes called? thanks

i can't think of situation error class needs abstract. more got error when trying instantiate abstract class. along lines of "cannot create instance of abstract class".

abstract classes cannot not instantiated directly. instead extended child class (a concrete class) can instantiated. abstract class template provides common functionality other sub-classes. includes abstract methods child classes must implement.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -