fork download
  1. <?php
  2.  
  3. interface Talkable
  4. {
  5. public function talk();
  6. }
  7.  
  8. interface Meowable extends Talkable
  9. {
  10. public function meow();
  11. }
  12.  
  13. class Cat implements Meowable
  14. {
  15. public function talk() {}
  16. public function meow() {}
  17. }
  18.  
  19. function test(Meowable $cat)
  20. {
  21.  
  22. }
  23.  
  24. test(new Cat());
  25.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Standard output is empty