This is not a tutorial; please don’t do this.
A common school of thought among programmers is to reduce repetition wherever possible. Usually, this is a good idea, as if I need to change something, I only need to change it in one place. We usually accomplish this using inheritance
A lot of defenders of PHP will say that the language has improved immensely in later versions with better support for OOP, which it has! However, PHP is fundamentally broken in its implementations of its stock functions, even compared to other dynamically-typed languages such as JavaScript. Let’s look at some examples:
We use a lot of images when we build websites nowadays, and while some might disagree with this, I doubt it’s going anywhere. As a result, we have to invest a lot of work into optimizing those images as much as possible, often resorting to ugly and dated compression techniques. WebP is a new image format designed by Google for the modern web.