Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- interface CatI
- {
- public function walk();
- public function feed();
- }
- abstract class Cat implements CatI
- {
- protected $paws = 4;
- public function walk()
- {
- echo "Walking";
- }
- }
- class Tiger extends Cat
- {
- public $power = 100;
- public function feed() {}
- }
- $myTiger = new Tiger();
- $myTiger->walk(); // walking
Add Comment
Please, Sign In to add comment