Solid, Solid Principles, PHP, Software Development, Software Engineering.
notice that there is a problem. Ostriches cannot fly and yet they are birds too like Canari. Two Questions: Can the Bird be replaced by a Canary in all cases? ⇒ Yes Can the Bird be replaced by an Ostrich in all cases? ⇒ No because of the fly method throwing an exception that the parent class Bird