Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $bird = new Parrot();
- $bird->fly();
- interface BirdInterface
- {
- public function fly();
- }
- class Parrot implements BirdInterface
- {
- public function fly()
- {
- // ...fly away, Peter!
- }
- }
- class Penguin implements BirdInterface
- {
- // ...don't fly
- }
Add Comment
Please, Sign In to add comment