You will often hear that an interface is a contract. This is true in as much as an interface defines the public methods that a class must implement. For example, if you have two objects that are each instance of a different class, yet they implement the same interface, then both objects must at a minimum offer the public methods defined in the interface which they implement. An interface contains no logic. In addition to this, interfaces contain no data variables, only function prototypes.
Thanks to https://vegibit.com/interface-example... for the great tutorial!
Sur cette page du site, vous pouvez voir la vidéo en ligne PHP Tutorial for Beginners | PHP OOP Interface Examples durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Cybergenics 05 janvier 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 67 fois et il a aimé 1 téléspectateurs. Bon visionnage!