note 56578 added to language.oop5.abstract

From: Date: Thu, 08 Sep 2005 00:52:38 +0000
Subject: note 56578 added to language.oop5.abstract
Groups: php.notes 
Request: Send a blank email to php-notes+get-94884@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/language.oop5.abstract.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56578 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56578&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56578&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56578&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56578&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56578&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56578&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56578&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94884) next »