note 77600 added to language.oop5.interfaces

From: Date: Wed, 05 Sep 2007 14:39:03 +0000
Subject: note 77600 added to language.oop5.interfaces
Groups: php.notes 
Request: Send a blank email to php-notes+get-130208@lists.php.net to get a copy of this message
Please note that the sentence "Note: A class cannot implement two interfaces that share function names, since it would cause ambiguity." _really_ means that it is not possible to do something like: <?php interface IA { public function a(); } interface IB { public function a(); } class Test implements IA, IB { public function a() { echo "a"; } } $o = new Test(); $o->a(); ?> lead to: PHP Fatal error: Can't inherit abstract function IB::a() (previously declared abstract in IA) It's important to note this because it is very unexpected behavior and renders many common Interface completly useless. ---- Server IP: 69.147.83.197 Probable Submitter: 212.202.71.199 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php Edit -- https://master.php.net/note/edit/77600 Del: integrated -- https://master.php.net/note/delete/77600/integrated Del: useless -- https://master.php.net/note/delete/77600/useless Del: bad code -- https://master.php.net/note/delete/77600/bad+code Del: spam -- https://master.php.net/note/delete/77600/spam Del: non-english -- https://master.php.net/note/delete/77600/non-english Del: in docs -- https://master.php.net/note/delete/77600/in+docs Del: other reasons-- https://master.php.net/note/delete/77600 Reject -- https://master.php.net/note/reject/77600 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130208) next »