Created
May 29, 2022 10:14
-
-
Save atakde/11c0db82981f46524ddef2e0bed50ed3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface FlyingCreature | |
{ | |
public function fly(); | |
} | |
interface FeatheredCreature | |
{ | |
public function molt(); | |
} | |
interface SwimmingCreature | |
{ | |
public function swim(); | |
} | |
class Eagle implements FeatheredCreature, FlyingCreature | |
{ | |
public function fly() | |
{ | |
// ... | |
} | |
public function molt() | |
{ | |
// ... | |
} | |
} | |
class Penguin implements FeatheredCreature, SwimmingCreature | |
{ | |
public function molt() | |
{ | |
// ... | |
} | |
public function swim() | |
{ | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment