Вариант 1.
Bird:
public function fly() { echo 'I can fly', PHP_EOL; }
Chicken:
public function fly() { echo 'I can not fly', PHP_EOL; }
Вариант 2.
Eagle, Duck:
public function fly() { echo 'I can fly', PHP_EOL; }
Chicken:
public function fly() { echo 'I can not fly', PHP_EOL; }
Вариант 3.
FlyBird:
public function fly() { echo 'I can fly', PHP_EOL; }
Eagle, Duck extends FlyBird
Chicken:
public function fly() { echo 'I can not fly', PHP_EOL; }
Вариант 4.
trait FlyBird:
public function fly() { echo 'I can fly', PHP_EOL; }
Eagle, Duck use FlyBird
Chicken:
public function fly() { echo 'I can not fly', PHP_EOL; }