Skip to content

Instantly share code, notes, and snippets.

@atakde
Created May 29, 2022 10:14
Show Gist options
  • Save atakde/11c0db82981f46524ddef2e0bed50ed3 to your computer and use it in GitHub Desktop.
Save atakde/11c0db82981f46524ddef2e0bed50ed3 to your computer and use it in GitHub Desktop.
<?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