Do We Really Need Objects?
The ability of any server-side scripting language to "include" files within a web page reduces initial work and ongoing maintenance. For instance, suppose a website contains a menu at the top of each web page, and this menu is identical throughout the site. You could cut and paste the appropriate code into every page, but this is both cumbersome and counterproductive. It's much better to write the code once and use a server-side scripting language to insert the menu wherever it's needed. That way, should an update be required, you can make one change to one file rather than changing many files. This makes site-wide updates much easier.
You could summarize this approach as "include and reuse; don't rewrite." In a sense, ...
Get Object-Oriented PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.