Guest User

Untitled

a guest
Aug 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 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. }
  14.  
  15. class Tiger extends Cat
  16. {
  17. public $power = 100;
  18.  
  19. public function __construct()
  20. {
  21. echo $this->paws;
  22. }
  23.  
  24. public function walk() {}
  25. public function feed() {}
  26. }
  27.  
  28. $myCat = new Tiger(); // 4
Add Comment
Please, Sign In to add comment