What is great with contracts agreements? It defines all the ways how two objects can interact.
What does everyone’s code uglier? Actually, the only thing is code itself. Unnecessary code. The code that would not be written if the author of library I use thought about me, but not about his awesomeness.
Let’s talk about the most popular question in programmers job interview:
What is the difference between interface and abstract class?
Ok, the simple answer is that abstract class can contain some code, but interface contains only function or fields definitions. As for PHP, interface can define only functions.