Guest User

Untitled

a guest
Aug 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <?php
  2.  
  3. interface CatI
  4. {
  5. public function walk();
  6. public function feed();
  7. }
  8.  
  9. abstract class Cat implements CatI
  10. {
  11. protected $paws = 4;
  12.  
  13. public function walk()
  14. {
  15. echo "Walking";
  16. }
  17.  
  18. }
  19.  
  20. class Tiger extends Cat
  21. {
  22. public $power = 100;
  23.  
  24. public function feed() {}
  25. }
  26.  
  27. $myTiger = new Tiger();
  28. $myTiger->walk(); // walking
Add Comment
Please, Sign In to add comment