note 102803 added to language.oop5.interfaces

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
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".
----
Server IP: 69.147.83.197
Probable Submitter: 90.80.39.42
----
Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php
Edit        -- https://master.php.net/note/edit/102803
Del: integrated  -- https://master.php.net/note/delete/102803/integrated
Del: useless     -- https://master.php.net/note/delete/102803/useless
Del: bad code    -- https://master.php.net/note/delete/102803/bad+code
Del: spam        -- https://master.php.net/note/delete/102803/spam
Del: non-english -- https://master.php.net/note/delete/102803/non-english
Del: in docs     -- https://master.php.net/note/delete/102803/in+docs
Del: other reasons-- https://master.php.net/note/delete/102803
Reject      -- https://master.php.net/note/reject/102803
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.