class absclass {
abstract public function fuc();
}
reports:
PHP Fatal error: Class absclass contains 1 abstract metho
I wanted to use an abstract method within a non-abstract class (normal class?) and found that I could wrap the method's contents in an 'if' statement with get_parent_class() like so:
if (get_parent_class($this) !== false) {
Or, in action (tested in a file on cmd line: php -f "abstract_method_normal_class_test.php"):
Output:
I'm dad
I'm child
PHP get_parent_class() Documentation