Book Image

Clean Code in PHP

By : Carsten Windler, Alexandre Daubois
5 (1)
Book Image

Clean Code in PHP

5 (1)
By: Carsten Windler, Alexandre Daubois

Overview of this book

PHP is a beginner-friendly language, but also one that is rife with complaints of bad code,;yet no clean code books are specific to PHP. Enter Clean Code in PHP. This book is a one-stop guide to learning the theory and best practices of clean code specific to real-world PHP app development environments. This PHP book is cleanly split to help you navigate through coding practices and theories to understand and adopt the nuances of the clean code paradigm. In addition to covering best practices, tooling for code quality, and PHP design patterns, this book also presents tips and techniques for working on large-scale PHP apps with a team and writing effective documentation for your PHP projects. By the end of this book, you’ll be able to write human-friendly PHP code, which will fuel your PHP career growth and set you apart from the competition.
Table of Contents (18 chapters)
1
Part 1 – Introducing Clean Code
8
Part 2 – Maintaining Code Quality

Summary

Do you understand what is meant by “building on what we know”? We realize with a little hindsight that this is again a lot of common sense and altruism, thinking of the next developers who will pass over our code. Here, there was no question of scouts, SOLID, Keep It Simple, Stupid (KISS), or other principles. It’s about rethinking our very methods of writing code.

We must remember that the basics can (and should) be questioned and not considered as set in stone. Self-confidence is a wonderful thing, and if you are able to combine this with continuous questioning of your habits in a perspective of continuous improvement, you are on the right track to becoming an excellent developer, being able to write clean code naturally, and bringing your collaborators with you in this practice.

Taking the initiative is a remarkable thing; knowing the risks and evaluating them in your context is the key to striving for perfection. This way, you are able to know...