Assuming the Horse class exists, which is a valid example of inheritance in PHP?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
  • class Pegasus extends Horse {}
  • class Alicorn imports Pegasus, Unicorn {}
  • class Unicorn implements Horse {}
  • class Horse inherits Unicorn {}
0/5 (0 Reviews)

Like this article?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Related Posts