note 56578 rejected from language.oop5.abstract by betz

From: Date: Thu, 08 Sep 2005 09:07:27 +0000
Subject: note 56578 rejected from language.oop5.abstract by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-94899@lists.php.net to get a copy of this message
Note Submitter: mezimm at gmail dot com ---- Abstract classes can inherit from abstract classes. If that is the case, then this should produce an error: <?php abstract class ClassOne { abstract function hello(); } abstract class ClassTwo extends ClassOne { // look mom, no hello() function! } class ClassThree extends ClassTwo { function hello() { echo "no error"; } } $three = new ClassThree(); // outputs "no error" ?> According to the docs, since ClassTwo does not implement the abstract method hello(), it should fail; but it does not.

« previous php.notes (#94899) next »