PHP Best Practices

What I consider the best practices for web and software development.


PHP Best Practices

Don’t miss out what are the new features from PHP 8!

Apart from consulting:

Teamwork

   
Agile Agile software development values
Agreements We need conventions
Code Reviews Pair Programming & Pull Request
Documentation Document your knowledge
Estimations Discover the unknowns
Knowledge sharing Follow the news of your stack

Technical skills

   
Comments They are not always updated
Decoupled business logic Abstraction, concretions, layers and dependencies
Final Classes Composition over inheritance
Functions They should be small
Git Mastering The best software version control
IDE Know your IDE
Immutability It makes the code more predictable
Meaningful Names It should tell you why it exists and what it does
Minimum Scope For your variables, methods, and classes
Performance Tips Use strict comparison
Strict Types Use strict_types constant when possible
Static Analysis Identify bugs in your code
Testing Test what your software does