Modern PHP without a framework
I&#x27;m seriously not sure if this is satire. It starts off with a simple example, and then goes down a rabbit-hole of massive complexity to ultimately do the same thing. This reminds me of the many OOP articles that were common shortly before the turn of the century, which would take as an example a perfectly straightforward and simple-to-understand piece of code and then bloat it into an asinine multilayered monstrosity by applying a generous amount of &quot;OOP best practices and patterns&quot; while straight-facedly enumerating all the alleged benefits.<p><i>When you first started with PHP, you may have used includes or requires statements throughout your app to bring in functionality or configuration from other PHP files. In general, we want to avoid that because it makes it much harder for a human to follow the code path and understand where dependencies lie.</i><p><i>Autoloading just means that when your application needs to use a class, PHP knows where to look for it and automatically loads it when it&#x27;s called for.</i><p>How in $deity&#x27;s name can you say that specifying immediately the exact path to the file included, in the file that includes it, is &quot;much harder to follow&quot; than hiding it behind the indirection of the autoloader and whatever it does!? Honestly, <i>WTF!?</i><p>(Maybe the joke here is that everyone is just pretending to admire the emperor&#x27;s new clothes, in which case I apologise.)<p>Edit: here&#x27;s an example of the OOP articles I mentioned: <a href="https:&#x2F;&#x2F;csis.pace.edu&#x2F;~bergin&#x2F;patterns&#x2F;ppoop.html" rel="nofollow">https:&#x2F;&#x2F;csis.pace.edu&#x2F;~bergin&#x2F;patterns&#x2F;ppoop.html</a>