Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- interface a{
- public function a1();
- }
- interface b{
- public function b1();
- }
- interface x extends a, b {
- public function x1();
- }
- class SomeClass implements x {
- public function a1(){ //method from interface a
- echo "SomeClass::a1()<br>";
- }
- public function b1(){ //method from interface b
- echo "SomeClass::b1()<br>";
- }
- public function x1(){ //method from interface b
- echo "SomeClass::x1()<br>";
- }
- }
- $o = new SomeClass();
- $o->a1();
- $o->b1();
- $o->x1();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement