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;
- }
- class Tiger extends Cat
- {
- public $power = 100;
- public function __construct()
- {
- echo $this->paws;
- }
- public function walk() {}
- public function feed() {}
- }
- $myCat = new Tiger(); // 4
Add Comment
Please, Sign In to add comment