note 102803 deleted from language.oop5.interfaces by danbrown

From: Date: Mon, 07 Mar 2011 17:05:35 +0000
Subject: note 102803 deleted from language.oop5.interfaces by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-177632@lists.php.net to get a copy of this message
Note Submitter: lpu8er at noSpam dot gmail dot com ---- To thanhn2001 at gmail dot com : Neither a bug nor a feature, it is because of the main functionality of interfaces. If you inherits a class B to a A, with A which implements an interface iInterface, B is not implementing it. For example: <?php interface iMy { public function king(); } class A implements iMy { public function king() { } // otherwise, Fatal Error } class B extends A { } // no Fatal Error ?> But if you explicitely ask an implement of iMy in B... <?php interface iMy { public function king(); } class A implements iMy { public function king() { } // otherwise, Fatal Error } class B extends A implements iMy { } // Fatal Error ?> So, in your case, there is no "overwrite".

« previous php.notes (#177632) next »