PSR-2 predated return types, nullable types, multi-line arguments and trait conflict resolution, so every project had a house rule for each of them. PSR-12 writes them down. The…
Every framework had middleware and none of them agreed on the signature, so a piece of middleware was written once per framework despite doing the same thing. The…
A file importing six classes from the same namespace repeats the namespace six times, which is noise that grows with the depth of the tree. It is purely…
PSR-0 mapped the entire namespace onto the path, so AppReportBuilder had to live at src/App/Report/Builder.php — the vendor and package name repeated inside a directory that was already…
Namespaced code can import classes with use, but until 5.6 functions and constants had no equivalent. Calling a namespaced function meant either fully qualifying it every time or…
PSR-4 autoloading is triggered by a class name PHP cannot resolve. Functions and constants have no such hook, so a helpers file has to be loaded eagerly —…