PHP - Best Practices 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

Daniel Opitz

Daniel Opitz

Developer, Trainer & Open Source Contributor. Passionate about PHP, Slim Framework, and clean code.

Comments

↑ Back to Blog