PHP - Best Practices 2019

Daniel Opitz
Daniel Opitz
06 Dec 2019

I think it’s time for a fresh and simplified blog post about the latest PHP Best Practices in 2019 / 2020. A lot has changed within the last time I have written about this topic in 2018.

Principles and rules

Here are the most important rules:

Coding styles

Naming

Common rules

Dependency injection

Tools

Use a static code analyzer to detect bugs and errors. For example:

Read more